vcomp-test 0.0.4 → 0.0.6

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/README.md CHANGED
@@ -1,6 +1,3 @@
1
- # vue-comp-test
1
+ # frontend-builder
2
2
 
3
- Two components:
4
-
5
- * BtnComp1: 一个按钮组件
6
- * BtnComp100: 一个按钮组件
3
+ This template should help get you started developing with Vue 3 in Vite.
@@ -0,0 +1 @@
1
+ import{getCurrentInstance as t,inject as e,ref as r,computed as o,unref as n,warn as a,defineComponent as i,openBlock as s,createElementBlock as l,mergeProps as u,renderSlot as c,createElementVNode as f,watch as h,useSlots as d,Text as p,createBlock as g,resolveDynamicComponent as b,withCtx as v,Fragment as m,normalizeClass as y,createCommentVNode as x,provide as k,reactive as w,toRef as S,createVNode as M,createTextVNode as $,toDisplayString as _}from"vue";import{ElMessage as A}from"element-plus";const N=/* @__PURE__ */Symbol(),H="el",B=(t,e,r,o,n)=>{let a=`${t}-${e}`;return r&&(a+=`-${r}`),o&&(a+=`__${o}`),n&&(a+=`--${n}`),a},V=/* @__PURE__ */Symbol("namespaceContextKey"),z=(a,i)=>{const s=(()=>{const a=t()?e(V,r(H)):r(H);return o(()=>n(a)||H)})();return{namespace:s,b:(t="")=>B(s.value,a,t,"",""),e:t=>t?B(s.value,a,"",t,""):"",m:t=>t?B(s.value,a,"","",t):"",be:(t,e)=>t&&e?B(s.value,a,t,e,""):"",em:(t,e)=>t&&e?B(s.value,a,"",t,e):"",bm:(t,e)=>t&&e?B(s.value,a,t,"",e):"",bem:(t,e,r)=>t&&e&&r?B(s.value,a,t,e,r):"",is:(t,...e)=>{const r=!(e.length>=1)||e[0];return t&&r?`is-${t}`:""},cssVar:t=>{const e={};for(const r in t)t[r]&&(e[`--${s.value}-${r}`]=t[r]);return e},cssVarName:t=>`--${s.value}-${t}`,cssVarBlock:t=>{const e={};for(const r in t)t[r]&&(e[`--${s.value}-${a}-${r}`]=t[r]);return e},cssVarBlockName:t=>`--${s.value}-${a}-${t}`}};"production"===process.env.NODE_ENV||Object.freeze({}),"production"===process.env.NODE_ENV||Object.freeze([]);const R=()=>{},E=Object.prototype.hasOwnProperty,F=(t,e)=>E.call(t,e),O=t=>"string"==typeof t,I=t=>null!==t&&"object"==typeof t;class j extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function C(t,e){if("production"!==process.env.NODE_ENV){const r=O(t)?new j(`[${t}] ${e}`):t;console.warn(r)}}const q="__epPropKey",L=(t,e)=>{if(!I(t)||I(r=t)&&r[q])return t;var r;const{values:o,required:n,default:i,type:s,validator:l}=t,u=o||l?r=>{let n=!1,s=[];if(o&&(s=Array.from(o),F(t,"default")&&s.push(i),n||(n=s.includes(r))),l&&(n||(n=l(r))),!n&&s.length>0){const t=[...new Set(s)].map(t=>JSON.stringify(t)).join(", ");a(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${t}], got value ${JSON.stringify(r)}.`)}return n}:void 0,c={type:s,required:!!n,validator:u,[q]:!0};return F(t,"default")&&(c.default=i),c},P=t=>function(t){for(var e=-1,r=null==t?0:t.length,o={};++e<r;){var n=t[e];o[n[0]]=n[1]}return o}(Object.entries(t).map(([t,e])=>[t,L(e,t)])),T=L({type:String,values:["","default","small","large"],required:!1}),W=/* @__PURE__ */Symbol("size"),D=r();var K=(t,e)=>{const r=t.__vccOpts||t;for(const[o,n]of e)r[o]=n;return r};const U=(t,e)=>{if(t.install=r=>{for(const o of[t,...Object.values(null!=e?e:{})])r.component(o.name,o)},e)for(const[r,o]of Object.entries(e))t[r]=o;return t};function G(t,e="px"){return t||0===t?"number"==typeof t||(t=>!!O(t)&&!Number.isNaN(Number(t)))(t)?`${t}${e}`:O(t)?t:void C("utils/dom/style","binding value must be a string or number"):""}const J=U(/* @__PURE__ */K(i({name:"ElIcon",inheritAttrs:!1,__name:"icon",props:P({size:{type:[Number,String]},color:{type:String}}),setup(t){const e=t,r=z("icon"),a=o(()=>{const{size:t,color:r}=e,o=G(t);return o||r?{fontSize:o,"--color":r}:{}});return(t,e)=>(s(),l("i",u({class:n(r).b(),style:a.value},t.$attrs),[c(t.$slots,"default")],16))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]));var Q=/* @__PURE__ */i({name:"Loading",__name:"loading",setup:t=>(t,e)=>(s(),l("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[f("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))});const X=[String,Object,Function],Y=/* @__PURE__ */Symbol("formContextKey"),Z=/* @__PURE__ */Symbol("formItemContextKey"),tt=e=>{const r=t();return o(()=>{var t,o;return null==(o=null==(t=null==r?void 0:r.proxy)?void 0:t.$props)?void 0:o[e]})},et=(t,a={})=>{const i=r(void 0),s=a.prop?i:tt("size"),l=a.global?i:(()=>{const t=e(W,{});return o(()=>n(t.size)||"")})(),u=a.form?{size:void 0}:e(Y,void 0),c=a.formItem?{size:void 0}:e(Z,void 0);return o(()=>s.value||n(t)||(null==c?void 0:c.size)||(null==u?void 0:u.size)||l.value||"")},rt=t=>{const r=tt("disabled"),a=e(Y,void 0);return o(()=>{var e,o,i;return null!=(i=null!=(o=null!=(e=r.value)?e:n(t))?o:null==a?void 0:a.disabled)&&i})},ot=/* @__PURE__ */Symbol("buttonGroupContextKey"),nt=(a,i)=>{(({from:t,replacement:e,scope:r,version:o,ref:a,type:i="API"},s)=>{h(()=>n(s),n=>{n&&C(r,`[${i}] ${t} is about to be deprecated in version ${o}, please use ${e} instead.\nFor more detail, please visit: ${a}\n`)},{immediate:!0})})({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},o(()=>"text"===a.type));const s=e(ot,void 0),l=function(r,n){const a=t()?e(N,D):D;return o(()=>{var t,e;return null!=(e=null==(t=a.value)?void 0:t[r])?e:n})}("button"),{form:u}={form:e(Y,void 0),formItem:e(Z,void 0)},c=et(o(()=>null==s?void 0:s.size)),f=rt(),g=r(),b=d(),v=o(()=>{var t;return a.type||(null==s?void 0:s.type)||(null==(t=l.value)?void 0:t.type)||""}),m=o(()=>{var t,e,r;return null!=(r=null!=(e=a.autoInsertSpace)?e:null==(t=l.value)?void 0:t.autoInsertSpace)&&r}),y=o(()=>{var t,e,r;return null!=(r=null!=(e=a.plain)?e:null==(t=l.value)?void 0:t.plain)&&r}),x=o(()=>{var t,e,r;return null!=(r=null!=(e=a.round)?e:null==(t=l.value)?void 0:t.round)&&r}),k=o(()=>{var t,e,r;return null!=(r=null!=(e=a.text)?e:null==(t=l.value)?void 0:t.text)&&r}),w=o(()=>"button"===a.tag?{ariaDisabled:f.value||a.loading,disabled:f.value||a.loading,autofocus:a.autofocus,type:a.nativeType}:{}),S=o(()=>{var t;const e=null==(t=b.default)?void 0:t.call(b);if(m.value&&1===(null==e?void 0:e.length)){const t=e[0];if((null==t?void 0:t.type)===p){const e=t.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(e.trim())}}return!1});return{_disabled:f,_size:c,_type:v,_ref:g,_props:w,_plain:y,_round:x,_text:k,shouldAddSpace:S,handleClick:t=>{f.value||a.loading?t.stopPropagation():("reset"===a.nativeType&&(null==u||u.resetFields()),i("click",t))}}},at=P({size:T,disabled:{type:Boolean,default:void 0},type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:X},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:X,default:()=>Q},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:[String,Object],default:"button"}}),it={click:t=>t instanceof MouseEvent};function st(t,e){(function(t){return"string"==typeof t&&-1!==t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!==t.indexOf("%")}(t);return t=360===e?t:Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:t=360===e?(t<0?t%e+e:t%e)/parseFloat(String(e)):t%e/parseFloat(String(e))}function lt(t){return Math.min(1,Math.max(0,t))}function ut(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function ct(t){return t<=1?"".concat(100*Number(t),"%"):t}function ft(t){return 1===t.length?"0"+t:String(t)}function ht(t,e,r){t=st(t,255),e=st(e,255),r=st(r,255);var o=Math.max(t,e,r),n=Math.min(t,e,r),a=0,i=0,s=(o+n)/2;if(o===n)i=0,a=0;else{var l=o-n;switch(i=s>.5?l/(2-o-n):l/(o+n),o){case t:a=(e-r)/l+(e<r?6:0);break;case e:a=(r-t)/l+2;break;case r:a=(t-e)/l+4}a/=6}return{h:a,s:i,l:s}}function dt(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*r*(e-t):r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function pt(t,e,r){t=st(t,255),e=st(e,255),r=st(r,255);var o=Math.max(t,e,r),n=Math.min(t,e,r),a=0,i=o,s=o-n,l=0===o?0:s/o;if(o===n)a=0;else{switch(o){case t:a=(e-r)/s+(e<r?6:0);break;case e:a=(r-t)/s+2;break;case r:a=(t-e)/s+4}a/=6}return{h:a,s:l,v:i}}function gt(t,e,r,o){var n=[ft(Math.round(t).toString(16)),ft(Math.round(e).toString(16)),ft(Math.round(r).toString(16))];return o&&n[0].startsWith(n[0].charAt(1))&&n[1].startsWith(n[1].charAt(1))&&n[2].startsWith(n[2].charAt(1))?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function bt(t){return vt(t)/255}function vt(t){return parseInt(t,16)}var mt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function yt(t){var e,r,o,n={r:0,g:0,b:0},a=1,i=null,s=null,l=null,u=!1,c=!1;return"string"==typeof t&&(t=function(t){if(t=t.trim().toLowerCase(),0===t.length)return!1;var e=!1;if(mt[t])t=mt[t],e=!0;else if("transparent"===t)return{r:0,g:0,b:0,a:0,format:"name"};var r=St.rgb.exec(t);if(r)return{r:r[1],g:r[2],b:r[3]};if(r=St.rgba.exec(t),r)return{r:r[1],g:r[2],b:r[3],a:r[4]};if(r=St.hsl.exec(t),r)return{h:r[1],s:r[2],l:r[3]};if(r=St.hsla.exec(t),r)return{h:r[1],s:r[2],l:r[3],a:r[4]};if(r=St.hsv.exec(t),r)return{h:r[1],s:r[2],v:r[3]};if(r=St.hsva.exec(t),r)return{h:r[1],s:r[2],v:r[3],a:r[4]};if(r=St.hex8.exec(t),r)return{r:vt(r[1]),g:vt(r[2]),b:vt(r[3]),a:bt(r[4]),format:e?"name":"hex8"};if(r=St.hex6.exec(t),r)return{r:vt(r[1]),g:vt(r[2]),b:vt(r[3]),format:e?"name":"hex"};if(r=St.hex4.exec(t),r)return{r:vt(r[1]+r[1]),g:vt(r[2]+r[2]),b:vt(r[3]+r[3]),a:bt(r[4]+r[4]),format:e?"name":"hex8"};if(r=St.hex3.exec(t),r)return{r:vt(r[1]+r[1]),g:vt(r[2]+r[2]),b:vt(r[3]+r[3]),format:e?"name":"hex"};return!1}(t)),"object"==typeof t&&(Mt(t.r)&&Mt(t.g)&&Mt(t.b)?(e=t.r,r=t.g,o=t.b,n={r:255*st(e,255),g:255*st(r,255),b:255*st(o,255)},u=!0,c="%"===String(t.r).substr(-1)?"prgb":"rgb"):Mt(t.h)&&Mt(t.s)&&Mt(t.v)?(i=ct(t.s),s=ct(t.v),n=function(t,e,r){t=6*st(t,360),e=st(e,100),r=st(r,100);var o=Math.floor(t),n=t-o,a=r*(1-e),i=r*(1-n*e),s=r*(1-(1-n)*e),l=o%6;return{r:255*[r,i,a,a,s,r][l],g:255*[s,r,r,i,a,a][l],b:255*[a,a,s,r,r,i][l]}}(t.h,i,s),u=!0,c="hsv"):Mt(t.h)&&Mt(t.s)&&Mt(t.l)&&(i=ct(t.s),l=ct(t.l),n=function(t,e,r){var o,n,a;if(t=st(t,360),e=st(e,100),r=st(r,100),0===e)n=r,a=r,o=r;else{var i=r<.5?r*(1+e):r+e-r*e,s=2*r-i;o=dt(s,i,t+1/3),n=dt(s,i,t),a=dt(s,i,t-1/3)}return{r:255*o,g:255*n,b:255*a}}(t.h,i,l),u=!0,c="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(a=t.a)),a=ut(a),{ok:u,format:t.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:a}}var xt="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),kt="[\\s|\\(]+(".concat(xt,")[,|\\s]+(").concat(xt,")[,|\\s]+(").concat(xt,")\\s*\\)?"),wt="[\\s|\\(]+(".concat(xt,")[,|\\s]+(").concat(xt,")[,|\\s]+(").concat(xt,")[,|\\s]+(").concat(xt,")\\s*\\)?"),St={CSS_UNIT:new RegExp(xt),rgb:new RegExp("rgb"+kt),rgba:new RegExp("rgba"+wt),hsl:new RegExp("hsl"+kt),hsla:new RegExp("hsla"+wt),hsv:new RegExp("hsv"+kt),hsva:new RegExp("hsva"+wt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Mt(t){return Boolean(St.CSS_UNIT.exec(String(t)))}var $t=function(){function t(e,r){var o;if(void 0===e&&(e=""),void 0===r&&(r={}),e instanceof t)return e;"number"==typeof e&&(e=function(t){return{r:t>>16,g:(65280&t)>>8,b:255&t}}(e)),this.originalInput=e;var n=yt(e);this.originalInput=e,this.r=n.r,this.g=n.g,this.b=n.b,this.a=n.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(o=r.format)&&void 0!==o?o:n.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=n.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},t.prototype.getLuminance=function(){var t=this.toRgb(),e=t.r/255,r=t.g/255,o=t.b/255;return.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(t){return this.a=ut(t),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){return 0===this.toHsl().s},t.prototype.toHsv=function(){var t=pt(this.r,this.g,this.b);return{h:360*t.h,s:t.s,v:t.v,a:this.a}},t.prototype.toHsvString=function(){var t=pt(this.r,this.g,this.b),e=Math.round(360*t.h),r=Math.round(100*t.s),o=Math.round(100*t.v);return 1===this.a?"hsv(".concat(e,", ").concat(r,"%, ").concat(o,"%)"):"hsva(".concat(e,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var t=ht(this.r,this.g,this.b);return{h:360*t.h,s:t.s,l:t.l,a:this.a}},t.prototype.toHslString=function(){var t=ht(this.r,this.g,this.b),e=Math.round(360*t.h),r=Math.round(100*t.s),o=Math.round(100*t.l);return 1===this.a?"hsl(".concat(e,", ").concat(r,"%, ").concat(o,"%)"):"hsla(".concat(e,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(t){return void 0===t&&(t=!1),gt(this.r,this.g,this.b,t)},t.prototype.toHexString=function(t){return void 0===t&&(t=!1),"#"+this.toHex(t)},t.prototype.toHex8=function(t){return void 0===t&&(t=!1),function(t,e,r,o,n){var a,i=[ft(Math.round(t).toString(16)),ft(Math.round(e).toString(16)),ft(Math.round(r).toString(16)),ft((a=o,Math.round(255*parseFloat(a)).toString(16)))];return n&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this.r,this.g,this.b,this.a,t)},t.prototype.toHex8String=function(t){return void 0===t&&(t=!1),"#"+this.toHex8(t)},t.prototype.toHexShortString=function(t){return void 0===t&&(t=!1),1===this.a?this.toHexString(t):this.toHex8String(t)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var t=Math.round(this.r),e=Math.round(this.g),r=Math.round(this.b);return 1===this.a?"rgb(".concat(t,", ").concat(e,", ").concat(r,")"):"rgba(".concat(t,", ").concat(e,", ").concat(r,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var t=function(t){return"".concat(Math.round(100*st(t,255)),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var t=function(t){return Math.round(100*st(t,255))};return 1===this.a?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var t="#"+gt(this.r,this.g,this.b,!1),e=0,r=Object.entries(mt);e<r.length;e++){var o=r[e],n=o[0];if(t===o[1])return n}return!1},t.prototype.toString=function(t){var e=Boolean(t);t=null!=t?t:this.format;var r=!1,o=this.a<1&&this.a>=0;return e||!o||!t.startsWith("hex")&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this.a?this.toName():this.toRgbString()},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){void 0===e&&(e=10);var r=this.toHsl();return r.l+=e/100,r.l=lt(r.l),new t(r)},t.prototype.brighten=function(e){void 0===e&&(e=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-e/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-e/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-e/100*255))),new t(r)},t.prototype.darken=function(e){void 0===e&&(e=10);var r=this.toHsl();return r.l-=e/100,r.l=lt(r.l),new t(r)},t.prototype.tint=function(t){return void 0===t&&(t=10),this.mix("white",t)},t.prototype.shade=function(t){return void 0===t&&(t=10),this.mix("black",t)},t.prototype.desaturate=function(e){void 0===e&&(e=10);var r=this.toHsl();return r.s-=e/100,r.s=lt(r.s),new t(r)},t.prototype.saturate=function(e){void 0===e&&(e=10);var r=this.toHsl();return r.s+=e/100,r.s=lt(r.s),new t(r)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var r=this.toHsl(),o=(r.h+e)%360;return r.h=o<0?360+o:o,new t(r)},t.prototype.mix=function(e,r){void 0===r&&(r=50);var o=this.toRgb(),n=new t(e).toRgb(),a=r/100;return new t({r:(n.r-o.r)*a+o.r,g:(n.g-o.g)*a+o.g,b:(n.b-o.b)*a+o.b,a:(n.a-o.a)*a+o.a})},t.prototype.analogous=function(e,r){void 0===e&&(e=6),void 0===r&&(r=30);var o=this.toHsl(),n=360/r,a=[this];for(o.h=(o.h-(n*e>>1)+720)%360;--e;)o.h=(o.h+n)%360,a.push(new t(o));return a},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){void 0===e&&(e=6);for(var r=this.toHsv(),o=r.h,n=r.s,a=r.v,i=[],s=1/e;e--;)i.push(new t({h:o,s:n,v:a})),a=(a+s)%1;return i},t.prototype.splitcomplement=function(){var e=this.toHsl(),r=e.h;return[this,new t({h:(r+72)%360,s:e.s,l:e.l}),new t({h:(r+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var r=this.toRgb(),o=new t(e).toRgb(),n=r.a+o.a*(1-r.a);return new t({r:(r.r*r.a+o.r*o.a*(1-r.a))/n,g:(r.g*r.a+o.g*o.a*(1-r.a))/n,b:(r.b*r.a+o.b*o.a*(1-r.a))/n,a:n})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var r=this.toHsl(),o=r.h,n=[this],a=360/e,i=1;i<e;i++)n.push(new t({h:(o+i*a)%360,s:r.s,l:r.l}));return n},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}();function _t(t,e=20){return t.mix("#141414",e).toString()}var At=/* @__PURE__ */K(i({name:"ElButton",__name:"button",props:at,emits:it,setup(t,{expose:e,emit:r}){const a=t,i=r,f=function(t){const e=rt(),r=z("button");return o(()=>{let o={},n=t.color;if(n){const a=n.match(/var\((.*?)\)/);a&&(n=window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));const i=new $t(n),s=t.dark?i.tint(20).toString():_t(i,20);if(t.plain)o=r.cssVarBlock({"bg-color":t.dark?_t(i,90):i.tint(90).toString(),"text-color":n,"border-color":t.dark?_t(i,50):i.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":n,"hover-border-color":n,"active-bg-color":s,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":s}),e.value&&(o[r.cssVarBlockName("disabled-bg-color")]=t.dark?_t(i,90):i.tint(90).toString(),o[r.cssVarBlockName("disabled-text-color")]=t.dark?_t(i,50):i.tint(50).toString(),o[r.cssVarBlockName("disabled-border-color")]=t.dark?_t(i,80):i.tint(80).toString());else{const a=t.dark?_t(i,30):i.tint(30).toString(),l=i.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(o=r.cssVarBlock({"bg-color":n,"text-color":l,"border-color":n,"hover-bg-color":a,"hover-text-color":l,"hover-border-color":a,"active-bg-color":s,"active-border-color":s}),e.value){const e=t.dark?_t(i,50):i.tint(50).toString();o[r.cssVarBlockName("disabled-bg-color")]=e,o[r.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,o[r.cssVarBlockName("disabled-border-color")]=e}}}return o})}(a),h=z("button"),{_ref:d,_size:p,_type:k,_disabled:w,_props:S,_plain:M,_round:$,_text:_,shouldAddSpace:A,handleClick:N}=nt(a,i),H=o(()=>[h.b(),h.m(k.value),h.m(p.value),h.is("disabled",w.value),h.is("loading",a.loading),h.is("plain",M.value),h.is("round",$.value),h.is("circle",a.circle),h.is("text",_.value),h.is("link",a.link),h.is("has-bg",a.bg)]);return e({ref:d,size:p,type:k,disabled:w,shouldAddSpace:A}),(t,e)=>(s(),g(b(t.tag),u({ref_key:"_ref",ref:d},n(S),{class:H.value,style:n(f),onClick:n(N)}),{default:v(()=>[t.loading?(s(),l(m,{key:0},[t.$slots.loading?c(t.$slots,"loading",{key:0}):(s(),g(n(J),{key:1,class:y(n(h).is("loading"))},{default:v(()=>[(s(),g(b(t.loadingIcon)))]),_:1},8,["class"]))],64)):t.icon||t.$slots.icon?(s(),g(n(J),{key:1},{default:v(()=>[t.icon?(s(),g(b(t.icon),{key:0})):c(t.$slots,"icon",{key:1})]),_:3})):x("v-if",!0),t.$slots.default?(s(),l("span",{key:2,class:y({[n(h).em("text","expand")]:n(A)})},[c(t.$slots,"default")],2)):x("v-if",!0)]),_:3},16,["class","style","onClick"]))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);var Nt=/* @__PURE__ */K(i({name:"ElButtonGroup",__name:"button-group",props:{size:at.size,type:at.type,direction:{type:String,values:["horizontal","vertical"],default:"horizontal"}},setup(t){const e=t;k(ot,w({size:S(e,"size"),type:S(e,"type")}));const r=z("button");return(t,o)=>(s(),l("div",{class:y([n(r).b("group"),n(r).bm("group",e.direction)])},[c(t.$slots,"default")],2))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);const Ht=U(At,{ButtonGroup:Nt});Nt.install=R;const Bt={class:"w-100 h-100 bg-[#e7b18a] flex items-center justify-center gap-10"},Vt=/* @__PURE__ */i({__name:"VcomTest",setup(t){const e=r(0);function o(){e.value++,A({duration:3e3,message:`${e.value}`,type:"warning"})}return(t,r)=>{const a=Ht;return s(),l("div",Bt,[M(a,{onClick:o},{default:v(()=>[$("按钮"+_(n(e)),1)]),_:1}),r[0]||(r[0]=f("span",null,"对照组",-1))])}}});export{Vt as default};
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { default as BtnComp1 } from './TestComp.vue';
2
- import { default as BtnComp100 } from './BtnComp.vue';
3
- export { BtnComp1, BtnComp100 };
1
+ import { vcompTestResolver } from './resolver';
2
+ declare const VcompTest: () => Promise<typeof import("./VcomTest.vue")>;
3
+ export { VcompTest, vcompTestResolver };
@@ -0,0 +1,2 @@
1
+ import { ComponentResolver } from 'unplugin-vue-components';
2
+ export declare function vcompTestResolver(): ComponentResolver;
@@ -0,0 +1 @@
1
+ function O(){return{type:"component",resolve:O=>{if(console.log("VCOOOOOOOOOOOOOOOOOOOOOOOOMP=====",O),O)return{name:O,from:"@/components/TestComp.vue",sideEffects:""}}}}const e=()=>import("./VcomTest-9ZuNV3kj.js");export{e as VcompTest,O as vcompTestResolver};
package/package.json CHANGED
@@ -1,11 +1,8 @@
1
1
  {
2
2
  "name": "vcomp-test",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "private": false,
5
5
  "type": "module",
6
- "engines": {
7
- "node": "^20.19.0 || >=22.12.0"
8
- },
9
6
  "scripts": {
10
7
  "dev": "vite",
11
8
  "build": "run-p type-check \"build-only {@}\" --",
@@ -18,45 +15,46 @@
18
15
  "files": [
19
16
  "dist"
20
17
  ],
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/vcomp-test.es.js",
22
+ "require": "./dist/vcomp-test.cjs.js"
23
+ }
24
+ },
25
+ "peerDependencies": {
26
+ "element-plus": "*",
27
+ "vue": "*"
28
+ },
21
29
  "devDependencies": {
22
- "@intlify/unplugin-vue-i18n": "^11.0.3",
23
- "@tailwindcss/vite": "^4.1.18",
24
- "@tsconfig/node24": "^24.0.3",
25
- "@types/node": "^24.10.4",
30
+ "@tsconfig/node24": "^24.0.4",
31
+ "@types/node": "^24.10.9",
26
32
  "@vitejs/plugin-vue": "^6.0.3",
27
33
  "@vitejs/plugin-vue-jsx": "^5.1.3",
28
- "@vue/eslint-config-prettier": "^10.2.0",
29
34
  "@vue/eslint-config-typescript": "^14.6.0",
30
35
  "@vue/tsconfig": "^0.8.1",
31
- "element-plus": "^2.13.1",
36
+ "change-case": "^5.4.4",
32
37
  "eslint": "^9.39.2",
33
- "eslint-plugin-vue": "~10.6.2",
38
+ "eslint-config-prettier": "^10.1.8",
39
+ "eslint-plugin-vue": "~10.7.0",
34
40
  "jiti": "^2.6.1",
35
41
  "npm-run-all2": "^8.0.4",
36
- "pinia": "^3.0.4",
37
- "prettier": "3.7.4",
38
- "tailwindcss": "^4.1.17",
42
+ "prettier": "3.8.1",
43
+ "terser": "^5.46.0",
39
44
  "typescript": "~5.9.3",
40
- "unplugin-auto-import": "^20.3.0",
45
+ "vite": "^7.3.1",
46
+ "vite-plugin-env-helper": "^1.1.0",
47
+ "tailwindcss": "^4.1.18",
48
+ "@tailwindcss/vite": "^4.1.18",
49
+ "vite-svg-loader": "^5.1.0",
50
+ "unplugin-auto-import": "^21.0.0",
51
+ "unplugin-vue-components": "^31.0.0",
41
52
  "unplugin-element-plus": "^0.11.2",
42
- "unplugin-vue-components": "^30.0.0",
43
- "vite": "^7.3.0",
44
53
  "vite-plugin-dts": "^4.5.4",
45
- "vite-plugin-env-helper": "^1.1.0",
46
54
  "vite-plugin-vue-devtools": "^8.0.5",
47
- "vite-svg-loader": "^5.1.0",
48
- "vue-tsc": "^3.2.1"
49
- },
50
- "peerDependencies": {
51
- "element-plus": "*",
52
- "vue": "^3.0.0"
55
+ "vue-tsc": "^3.2.2"
53
56
  },
54
- "exports": {
55
- ".": {
56
- "types": "./dist/index.d.ts",
57
- "import": "./dist/vcomp.es.js",
58
- "require": "./dist/vcomp.cjs.js"
59
- },
60
- "./style.css": "./dist/vcomp.css"
57
+ "engines": {
58
+ "node": "^20.19.0 || >=22.12.0"
61
59
  }
62
60
  }
package/dist/vcomp.es.js DELETED
@@ -1,1072 +0,0 @@
1
- import { getCurrentInstance as Z, inject as w, ref as E, computed as h, unref as g, warn as Bt, defineComponent as I, createElementBlock as P, openBlock as S, mergeProps as lt, renderSlot as R, createElementVNode as At, watch as Et, useSlots as Ht, Text as Ct, createBlock as B, resolveDynamicComponent as G, withCtx as V, createCommentVNode as tt, Fragment as It, normalizeClass as W, provide as Rt, reactive as Vt, toRef as et, createTextVNode as ft, toDisplayString as dt } from "vue";
2
- import { ElMessage as ht } from "element-plus";
3
- const Pt = /* @__PURE__ */ Symbol(), D = "el", Tt = "is-", N = (t, r, e, n, a) => {
4
- let o = `${t}-${r}`;
5
- return e && (o += `-${e}`), n && (o += `__${n}`), a && (o += `--${a}`), o;
6
- }, Ot = /* @__PURE__ */ Symbol("namespaceContextKey"), zt = (t) => {
7
- const r = Z() ? w(Ot, E(D)) : E(D);
8
- return h(() => g(r) || D);
9
- }, F = (t, r) => {
10
- const e = zt();
11
- return {
12
- namespace: e,
13
- b: (c = "") => N(e.value, t, c, "", ""),
14
- e: (c) => c ? N(e.value, t, "", c, "") : "",
15
- m: (c) => c ? N(e.value, t, "", "", c) : "",
16
- be: (c, d) => c && d ? N(e.value, t, c, d, "") : "",
17
- em: (c, d) => c && d ? N(e.value, t, "", c, d) : "",
18
- bm: (c, d) => c && d ? N(e.value, t, c, "", d) : "",
19
- bem: (c, d, u) => c && d && u ? N(e.value, t, c, d, u) : "",
20
- is: (c, ...d) => {
21
- const u = d.length >= 1 ? d[0] : !0;
22
- return c && u ? `${Tt}${c}` : "";
23
- },
24
- cssVar: (c) => {
25
- const d = {};
26
- for (const u in c)
27
- c[u] && (d[`--${e.value}-${u}`] = c[u]);
28
- return d;
29
- },
30
- cssVarName: (c) => `--${e.value}-${c}`,
31
- cssVarBlock: (c) => {
32
- const d = {};
33
- for (const u in c)
34
- c[u] && (d[`--${e.value}-${t}-${u}`] = c[u]);
35
- return d;
36
- },
37
- cssVarBlockName: (c) => `--${e.value}-${t}-${c}`
38
- };
39
- };
40
- process.env.NODE_ENV !== "production" && Object.freeze({});
41
- process.env.NODE_ENV !== "production" && Object.freeze([]);
42
- const Ft = () => {
43
- }, jt = Object.prototype.hasOwnProperty, rt = (t, r) => jt.call(t, r), Y = (t) => typeof t == "string", gt = (t) => t !== null && typeof t == "object";
44
- function Gt(t) {
45
- for (var r = -1, e = t == null ? 0 : t.length, n = {}; ++r < e; ) {
46
- var a = t[r];
47
- n[a[0]] = a[1];
48
- }
49
- return n;
50
- }
51
- const Dt = (t) => typeof t == "number", Kt = (t) => Y(t) ? !Number.isNaN(Number(t)) : !1;
52
- class Lt extends Error {
53
- constructor(r) {
54
- super(r), this.name = "ElementPlusError";
55
- }
56
- }
57
- function vt(t, r) {
58
- if (process.env.NODE_ENV !== "production") {
59
- const e = Y(t) ? new Lt(`[${t}] ${r}`) : t;
60
- console.warn(e);
61
- }
62
- }
63
- const pt = "__epPropKey", j = (t) => t, qt = (t) => gt(t) && !!t[pt], bt = (t, r) => {
64
- if (!gt(t) || qt(t))
65
- return t;
66
- const { values: e, required: n, default: a, type: o, validator: i } = t, f = {
67
- type: o,
68
- required: !!n,
69
- validator: e || i ? (m) => {
70
- let v = !1, _ = [];
71
- if (e && (_ = Array.from(e), rt(t, "default") && _.push(a), v || (v = _.includes(m))), i && (v || (v = i(m))), !v && _.length > 0) {
72
- const H = [...new Set(_)].map((C) => JSON.stringify(C)).join(", ");
73
- Bt(
74
- `Invalid prop: validation failed${r ? ` for prop "${r}"` : ""}. Expected one of [${H}], got value ${JSON.stringify(
75
- m
76
- )}.`
77
- );
78
- }
79
- return v;
80
- } : void 0,
81
- [pt]: !0
82
- };
83
- return rt(t, "default") && (f.default = a), f;
84
- }, mt = (t) => Gt(
85
- Object.entries(t).map(([r, e]) => [
86
- r,
87
- bt(e, r)
88
- ])
89
- ), Wt = ["", "default", "small", "large"], Ut = bt({
90
- type: String,
91
- values: Wt,
92
- required: !1
93
- }), Jt = /* @__PURE__ */ Symbol("size"), Zt = () => {
94
- const t = w(Jt, {});
95
- return h(() => g(t.size) || "");
96
- }, nt = E();
97
- function Yt(t, r = void 0) {
98
- const e = Z() ? w(Pt, nt) : nt;
99
- return h(() => {
100
- var n, a;
101
- return (a = (n = e.value) == null ? void 0 : n[t]) != null ? a : r;
102
- });
103
- }
104
- var Q = (t, r) => {
105
- const e = t.__vccOpts || t;
106
- for (const [n, a] of r)
107
- e[n] = a;
108
- return e;
109
- };
110
- const yt = (t, r) => {
111
- if (t.install = (e) => {
112
- for (const n of [t, ...Object.values(r ?? {})])
113
- e.component(n.name, n);
114
- }, r)
115
- for (const [e, n] of Object.entries(r))
116
- t[e] = n;
117
- return t;
118
- }, Qt = (t) => (t.install = Ft, t), Xt = "utils/dom/style";
119
- function te(t, r = "px") {
120
- if (!t && t !== 0)
121
- return "";
122
- if (Dt(t) || Kt(t))
123
- return `${t}${r}`;
124
- if (Y(t))
125
- return t;
126
- vt(Xt, "binding value must be a string or number");
127
- }
128
- const ee = mt({
129
- size: {
130
- type: j([Number, String])
131
- },
132
- color: {
133
- type: String
134
- }
135
- }), re = I({
136
- name: "ElIcon",
137
- inheritAttrs: !1,
138
- __name: "icon",
139
- props: ee,
140
- setup(t) {
141
- const r = t, e = F("icon"), n = h(() => {
142
- const { size: a, color: o } = r, i = te(a);
143
- return !i && !o ? {} : {
144
- fontSize: i,
145
- "--color": o
146
- };
147
- });
148
- return (a, o) => (S(), P(
149
- "i",
150
- lt({
151
- class: g(e).b(),
152
- style: n.value
153
- }, a.$attrs),
154
- [
155
- R(a.$slots, "default")
156
- ],
157
- 16
158
- ));
159
- }
160
- });
161
- var ne = /* @__PURE__ */ Q(re, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);
162
- const at = yt(ne);
163
- var ae = /* @__PURE__ */ I({
164
- name: "Loading",
165
- __name: "loading",
166
- setup(t) {
167
- return (r, e) => (S(), P("svg", {
168
- xmlns: "http://www.w3.org/2000/svg",
169
- viewBox: "0 0 1024 1024"
170
- }, [
171
- At("path", {
172
- fill: "currentColor",
173
- d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"
174
- })
175
- ]));
176
- }
177
- }), oe = ae;
178
- const ot = j([
179
- String,
180
- Object,
181
- Function
182
- ]), X = /* @__PURE__ */ Symbol("formContextKey"), _t = /* @__PURE__ */ Symbol("formItemContextKey"), ie = () => {
183
- const t = w(X, void 0), r = w(_t, void 0);
184
- return {
185
- form: t,
186
- formItem: r
187
- };
188
- }, St = (t) => {
189
- const r = Z();
190
- return h(() => {
191
- var e, n;
192
- return (n = (e = r?.proxy) == null ? void 0 : e.$props) == null ? void 0 : n[t];
193
- });
194
- }, se = (t, r = {}) => {
195
- const e = E(void 0), n = r.prop ? e : St("size"), a = r.global ? e : Zt(), o = r.form ? { size: void 0 } : w(X, void 0), i = r.formItem ? { size: void 0 } : w(_t, void 0);
196
- return h(
197
- () => n.value || g(t) || i?.size || o?.size || a.value || ""
198
- );
199
- }, xt = (t) => {
200
- const r = St("disabled"), e = w(X, void 0);
201
- return h(() => {
202
- var n, a, o;
203
- return (o = (a = (n = r.value) != null ? n : g(t)) != null ? a : e?.disabled) != null ? o : !1;
204
- });
205
- }, kt = /* @__PURE__ */ Symbol(
206
- "buttonGroupContextKey"
207
- ), ce = ({ from: t, replacement: r, scope: e, version: n, ref: a, type: o = "API" }, i) => {
208
- Et(
209
- () => g(i),
210
- (s) => {
211
- s && vt(
212
- e,
213
- `[${o}] ${t} is about to be deprecated in version ${n}, please use ${r} instead.
214
- For more detail, please visit: ${a}
215
- `
216
- );
217
- },
218
- {
219
- immediate: !0
220
- }
221
- );
222
- }, ue = (t, r) => {
223
- ce(
224
- {
225
- from: "type.text",
226
- replacement: "link",
227
- version: "3.0.0",
228
- scope: "props",
229
- ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
230
- },
231
- h(() => t.type === "text")
232
- );
233
- const e = w(kt, void 0), n = Yt("button"), { form: a } = ie(), o = se(h(() => e?.size)), i = xt(), s = E(), f = Ht(), m = h(
234
- () => {
235
- var u;
236
- return t.type || e?.type || ((u = n.value) == null ? void 0 : u.type) || "";
237
- }
238
- ), v = h(
239
- () => {
240
- var u, l, b;
241
- return (b = (l = t.autoInsertSpace) != null ? l : (u = n.value) == null ? void 0 : u.autoInsertSpace) != null ? b : !1;
242
- }
243
- ), _ = h(
244
- () => {
245
- var u, l, b;
246
- return (b = (l = t.plain) != null ? l : (u = n.value) == null ? void 0 : u.plain) != null ? b : !1;
247
- }
248
- ), H = h(
249
- () => {
250
- var u, l, b;
251
- return (b = (l = t.round) != null ? l : (u = n.value) == null ? void 0 : u.round) != null ? b : !1;
252
- }
253
- ), C = h(() => {
254
- var u, l, b;
255
- return (b = (l = t.text) != null ? l : (u = n.value) == null ? void 0 : u.text) != null ? b : !1;
256
- }), T = h(() => t.tag === "button" ? {
257
- ariaDisabled: i.value || t.loading,
258
- disabled: i.value || t.loading,
259
- autofocus: t.autofocus,
260
- type: t.nativeType
261
- } : {}), c = h(() => {
262
- var u;
263
- const l = (u = f.default) == null ? void 0 : u.call(f);
264
- if (v.value && l?.length === 1) {
265
- const b = l[0];
266
- if (b?.type === Ct) {
267
- const Nt = b.children;
268
- return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(Nt.trim());
269
- }
270
- }
271
- return !1;
272
- });
273
- return {
274
- _disabled: i,
275
- _size: o,
276
- _type: m,
277
- _ref: s,
278
- _props: T,
279
- _plain: _,
280
- _round: H,
281
- _text: C,
282
- shouldAddSpace: c,
283
- handleClick: (u) => {
284
- if (i.value || t.loading) {
285
- u.stopPropagation();
286
- return;
287
- }
288
- t.nativeType === "reset" && a?.resetFields(), r("click", u);
289
- }
290
- };
291
- }, le = [
292
- "default",
293
- "primary",
294
- "success",
295
- "warning",
296
- "info",
297
- "danger",
298
- "text",
299
- ""
300
- ], fe = ["button", "submit", "reset"], U = mt({
301
- size: Ut,
302
- disabled: {
303
- type: Boolean,
304
- default: void 0
305
- },
306
- type: {
307
- type: String,
308
- values: le,
309
- default: ""
310
- },
311
- icon: {
312
- type: ot
313
- },
314
- nativeType: {
315
- type: String,
316
- values: fe,
317
- default: "button"
318
- },
319
- loading: Boolean,
320
- loadingIcon: {
321
- type: ot,
322
- default: () => oe
323
- },
324
- plain: {
325
- type: Boolean,
326
- default: void 0
327
- },
328
- text: {
329
- type: Boolean,
330
- default: void 0
331
- },
332
- link: Boolean,
333
- bg: Boolean,
334
- autofocus: Boolean,
335
- round: {
336
- type: Boolean,
337
- default: void 0
338
- },
339
- circle: Boolean,
340
- color: String,
341
- dark: Boolean,
342
- autoInsertSpace: {
343
- type: Boolean,
344
- default: void 0
345
- },
346
- tag: {
347
- type: j([String, Object]),
348
- default: "button"
349
- }
350
- }), de = {
351
- click: (t) => t instanceof MouseEvent
352
- };
353
- function p(t, r) {
354
- he(t) && (t = "100%");
355
- var e = ge(t);
356
- return t = r === 360 ? t : Math.min(r, Math.max(0, parseFloat(t))), e && (t = parseInt(String(t * r), 10) / 100), Math.abs(t - r) < 1e-6 ? 1 : (r === 360 ? t = (t < 0 ? t % r + r : t % r) / parseFloat(String(r)) : t = t % r / parseFloat(String(r)), t);
357
- }
358
- function O(t) {
359
- return Math.min(1, Math.max(0, t));
360
- }
361
- function he(t) {
362
- return typeof t == "string" && t.indexOf(".") !== -1 && parseFloat(t) === 1;
363
- }
364
- function ge(t) {
365
- return typeof t == "string" && t.indexOf("%") !== -1;
366
- }
367
- function wt(t) {
368
- return t = parseFloat(t), (isNaN(t) || t < 0 || t > 1) && (t = 1), t;
369
- }
370
- function z(t) {
371
- return t <= 1 ? "".concat(Number(t) * 100, "%") : t;
372
- }
373
- function A(t) {
374
- return t.length === 1 ? "0" + t : String(t);
375
- }
376
- function ve(t, r, e) {
377
- return {
378
- r: p(t, 255) * 255,
379
- g: p(r, 255) * 255,
380
- b: p(e, 255) * 255
381
- };
382
- }
383
- function it(t, r, e) {
384
- t = p(t, 255), r = p(r, 255), e = p(e, 255);
385
- var n = Math.max(t, r, e), a = Math.min(t, r, e), o = 0, i = 0, s = (n + a) / 2;
386
- if (n === a)
387
- i = 0, o = 0;
388
- else {
389
- var f = n - a;
390
- switch (i = s > 0.5 ? f / (2 - n - a) : f / (n + a), n) {
391
- case t:
392
- o = (r - e) / f + (r < e ? 6 : 0);
393
- break;
394
- case r:
395
- o = (e - t) / f + 2;
396
- break;
397
- case e:
398
- o = (t - r) / f + 4;
399
- break;
400
- }
401
- o /= 6;
402
- }
403
- return { h: o, s: i, l: s };
404
- }
405
- function K(t, r, e) {
406
- return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? t + (r - t) * (6 * e) : e < 1 / 2 ? r : e < 2 / 3 ? t + (r - t) * (2 / 3 - e) * 6 : t;
407
- }
408
- function pe(t, r, e) {
409
- var n, a, o;
410
- if (t = p(t, 360), r = p(r, 100), e = p(e, 100), r === 0)
411
- a = e, o = e, n = e;
412
- else {
413
- var i = e < 0.5 ? e * (1 + r) : e + r - e * r, s = 2 * e - i;
414
- n = K(s, i, t + 1 / 3), a = K(s, i, t), o = K(s, i, t - 1 / 3);
415
- }
416
- return { r: n * 255, g: a * 255, b: o * 255 };
417
- }
418
- function st(t, r, e) {
419
- t = p(t, 255), r = p(r, 255), e = p(e, 255);
420
- var n = Math.max(t, r, e), a = Math.min(t, r, e), o = 0, i = n, s = n - a, f = n === 0 ? 0 : s / n;
421
- if (n === a)
422
- o = 0;
423
- else {
424
- switch (n) {
425
- case t:
426
- o = (r - e) / s + (r < e ? 6 : 0);
427
- break;
428
- case r:
429
- o = (e - t) / s + 2;
430
- break;
431
- case e:
432
- o = (t - r) / s + 4;
433
- break;
434
- }
435
- o /= 6;
436
- }
437
- return { h: o, s: f, v: i };
438
- }
439
- function be(t, r, e) {
440
- t = p(t, 360) * 6, r = p(r, 100), e = p(e, 100);
441
- var n = Math.floor(t), a = t - n, o = e * (1 - r), i = e * (1 - a * r), s = e * (1 - (1 - a) * r), f = n % 6, m = [e, i, o, o, s, e][f], v = [s, e, e, i, o, o][f], _ = [o, o, s, e, e, i][f];
442
- return { r: m * 255, g: v * 255, b: _ * 255 };
443
- }
444
- function ct(t, r, e, n) {
445
- var a = [
446
- A(Math.round(t).toString(16)),
447
- A(Math.round(r).toString(16)),
448
- A(Math.round(e).toString(16))
449
- ];
450
- return n && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join("");
451
- }
452
- function me(t, r, e, n, a) {
453
- var o = [
454
- A(Math.round(t).toString(16)),
455
- A(Math.round(r).toString(16)),
456
- A(Math.round(e).toString(16)),
457
- A(ye(n))
458
- ];
459
- return a && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join("");
460
- }
461
- function ye(t) {
462
- return Math.round(parseFloat(t) * 255).toString(16);
463
- }
464
- function ut(t) {
465
- return y(t) / 255;
466
- }
467
- function y(t) {
468
- return parseInt(t, 16);
469
- }
470
- function _e(t) {
471
- return {
472
- r: t >> 16,
473
- g: (t & 65280) >> 8,
474
- b: t & 255
475
- };
476
- }
477
- var J = {
478
- aliceblue: "#f0f8ff",
479
- antiquewhite: "#faebd7",
480
- aqua: "#00ffff",
481
- aquamarine: "#7fffd4",
482
- azure: "#f0ffff",
483
- beige: "#f5f5dc",
484
- bisque: "#ffe4c4",
485
- black: "#000000",
486
- blanchedalmond: "#ffebcd",
487
- blue: "#0000ff",
488
- blueviolet: "#8a2be2",
489
- brown: "#a52a2a",
490
- burlywood: "#deb887",
491
- cadetblue: "#5f9ea0",
492
- chartreuse: "#7fff00",
493
- chocolate: "#d2691e",
494
- coral: "#ff7f50",
495
- cornflowerblue: "#6495ed",
496
- cornsilk: "#fff8dc",
497
- crimson: "#dc143c",
498
- cyan: "#00ffff",
499
- darkblue: "#00008b",
500
- darkcyan: "#008b8b",
501
- darkgoldenrod: "#b8860b",
502
- darkgray: "#a9a9a9",
503
- darkgreen: "#006400",
504
- darkgrey: "#a9a9a9",
505
- darkkhaki: "#bdb76b",
506
- darkmagenta: "#8b008b",
507
- darkolivegreen: "#556b2f",
508
- darkorange: "#ff8c00",
509
- darkorchid: "#9932cc",
510
- darkred: "#8b0000",
511
- darksalmon: "#e9967a",
512
- darkseagreen: "#8fbc8f",
513
- darkslateblue: "#483d8b",
514
- darkslategray: "#2f4f4f",
515
- darkslategrey: "#2f4f4f",
516
- darkturquoise: "#00ced1",
517
- darkviolet: "#9400d3",
518
- deeppink: "#ff1493",
519
- deepskyblue: "#00bfff",
520
- dimgray: "#696969",
521
- dimgrey: "#696969",
522
- dodgerblue: "#1e90ff",
523
- firebrick: "#b22222",
524
- floralwhite: "#fffaf0",
525
- forestgreen: "#228b22",
526
- fuchsia: "#ff00ff",
527
- gainsboro: "#dcdcdc",
528
- ghostwhite: "#f8f8ff",
529
- goldenrod: "#daa520",
530
- gold: "#ffd700",
531
- gray: "#808080",
532
- green: "#008000",
533
- greenyellow: "#adff2f",
534
- grey: "#808080",
535
- honeydew: "#f0fff0",
536
- hotpink: "#ff69b4",
537
- indianred: "#cd5c5c",
538
- indigo: "#4b0082",
539
- ivory: "#fffff0",
540
- khaki: "#f0e68c",
541
- lavenderblush: "#fff0f5",
542
- lavender: "#e6e6fa",
543
- lawngreen: "#7cfc00",
544
- lemonchiffon: "#fffacd",
545
- lightblue: "#add8e6",
546
- lightcoral: "#f08080",
547
- lightcyan: "#e0ffff",
548
- lightgoldenrodyellow: "#fafad2",
549
- lightgray: "#d3d3d3",
550
- lightgreen: "#90ee90",
551
- lightgrey: "#d3d3d3",
552
- lightpink: "#ffb6c1",
553
- lightsalmon: "#ffa07a",
554
- lightseagreen: "#20b2aa",
555
- lightskyblue: "#87cefa",
556
- lightslategray: "#778899",
557
- lightslategrey: "#778899",
558
- lightsteelblue: "#b0c4de",
559
- lightyellow: "#ffffe0",
560
- lime: "#00ff00",
561
- limegreen: "#32cd32",
562
- linen: "#faf0e6",
563
- magenta: "#ff00ff",
564
- maroon: "#800000",
565
- mediumaquamarine: "#66cdaa",
566
- mediumblue: "#0000cd",
567
- mediumorchid: "#ba55d3",
568
- mediumpurple: "#9370db",
569
- mediumseagreen: "#3cb371",
570
- mediumslateblue: "#7b68ee",
571
- mediumspringgreen: "#00fa9a",
572
- mediumturquoise: "#48d1cc",
573
- mediumvioletred: "#c71585",
574
- midnightblue: "#191970",
575
- mintcream: "#f5fffa",
576
- mistyrose: "#ffe4e1",
577
- moccasin: "#ffe4b5",
578
- navajowhite: "#ffdead",
579
- navy: "#000080",
580
- oldlace: "#fdf5e6",
581
- olive: "#808000",
582
- olivedrab: "#6b8e23",
583
- orange: "#ffa500",
584
- orangered: "#ff4500",
585
- orchid: "#da70d6",
586
- palegoldenrod: "#eee8aa",
587
- palegreen: "#98fb98",
588
- paleturquoise: "#afeeee",
589
- palevioletred: "#db7093",
590
- papayawhip: "#ffefd5",
591
- peachpuff: "#ffdab9",
592
- peru: "#cd853f",
593
- pink: "#ffc0cb",
594
- plum: "#dda0dd",
595
- powderblue: "#b0e0e6",
596
- purple: "#800080",
597
- rebeccapurple: "#663399",
598
- red: "#ff0000",
599
- rosybrown: "#bc8f8f",
600
- royalblue: "#4169e1",
601
- saddlebrown: "#8b4513",
602
- salmon: "#fa8072",
603
- sandybrown: "#f4a460",
604
- seagreen: "#2e8b57",
605
- seashell: "#fff5ee",
606
- sienna: "#a0522d",
607
- silver: "#c0c0c0",
608
- skyblue: "#87ceeb",
609
- slateblue: "#6a5acd",
610
- slategray: "#708090",
611
- slategrey: "#708090",
612
- snow: "#fffafa",
613
- springgreen: "#00ff7f",
614
- steelblue: "#4682b4",
615
- tan: "#d2b48c",
616
- teal: "#008080",
617
- thistle: "#d8bfd8",
618
- tomato: "#ff6347",
619
- turquoise: "#40e0d0",
620
- violet: "#ee82ee",
621
- wheat: "#f5deb3",
622
- white: "#ffffff",
623
- whitesmoke: "#f5f5f5",
624
- yellow: "#ffff00",
625
- yellowgreen: "#9acd32"
626
- };
627
- function Se(t) {
628
- var r = { r: 0, g: 0, b: 0 }, e = 1, n = null, a = null, o = null, i = !1, s = !1;
629
- return typeof t == "string" && (t = we(t)), typeof t == "object" && (k(t.r) && k(t.g) && k(t.b) ? (r = ve(t.r, t.g, t.b), i = !0, s = String(t.r).substr(-1) === "%" ? "prgb" : "rgb") : k(t.h) && k(t.s) && k(t.v) ? (n = z(t.s), a = z(t.v), r = be(t.h, n, a), i = !0, s = "hsv") : k(t.h) && k(t.s) && k(t.l) && (n = z(t.s), o = z(t.l), r = pe(t.h, n, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(t, "a") && (e = t.a)), e = wt(e), {
630
- ok: i,
631
- format: t.format || s,
632
- r: Math.min(255, Math.max(r.r, 0)),
633
- g: Math.min(255, Math.max(r.g, 0)),
634
- b: Math.min(255, Math.max(r.b, 0)),
635
- a: e
636
- };
637
- }
638
- var xe = "[-\\+]?\\d+%?", ke = "[-\\+]?\\d*\\.\\d+%?", $ = "(?:".concat(ke, ")|(?:").concat(xe, ")"), L = "[\\s|\\(]+(".concat($, ")[,|\\s]+(").concat($, ")[,|\\s]+(").concat($, ")\\s*\\)?"), q = "[\\s|\\(]+(".concat($, ")[,|\\s]+(").concat($, ")[,|\\s]+(").concat($, ")[,|\\s]+(").concat($, ")\\s*\\)?"), x = {
639
- CSS_UNIT: new RegExp($),
640
- rgb: new RegExp("rgb" + L),
641
- rgba: new RegExp("rgba" + q),
642
- hsl: new RegExp("hsl" + L),
643
- hsla: new RegExp("hsla" + q),
644
- hsv: new RegExp("hsv" + L),
645
- hsva: new RegExp("hsva" + q),
646
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
647
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
648
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
649
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
650
- };
651
- function we(t) {
652
- if (t = t.trim().toLowerCase(), t.length === 0)
653
- return !1;
654
- var r = !1;
655
- if (J[t])
656
- t = J[t], r = !0;
657
- else if (t === "transparent")
658
- return { r: 0, g: 0, b: 0, a: 0, format: "name" };
659
- var e = x.rgb.exec(t);
660
- return e ? { r: e[1], g: e[2], b: e[3] } : (e = x.rgba.exec(t), e ? { r: e[1], g: e[2], b: e[3], a: e[4] } : (e = x.hsl.exec(t), e ? { h: e[1], s: e[2], l: e[3] } : (e = x.hsla.exec(t), e ? { h: e[1], s: e[2], l: e[3], a: e[4] } : (e = x.hsv.exec(t), e ? { h: e[1], s: e[2], v: e[3] } : (e = x.hsva.exec(t), e ? { h: e[1], s: e[2], v: e[3], a: e[4] } : (e = x.hex8.exec(t), e ? {
661
- r: y(e[1]),
662
- g: y(e[2]),
663
- b: y(e[3]),
664
- a: ut(e[4]),
665
- format: r ? "name" : "hex8"
666
- } : (e = x.hex6.exec(t), e ? {
667
- r: y(e[1]),
668
- g: y(e[2]),
669
- b: y(e[3]),
670
- format: r ? "name" : "hex"
671
- } : (e = x.hex4.exec(t), e ? {
672
- r: y(e[1] + e[1]),
673
- g: y(e[2] + e[2]),
674
- b: y(e[3] + e[3]),
675
- a: ut(e[4] + e[4]),
676
- format: r ? "name" : "hex8"
677
- } : (e = x.hex3.exec(t), e ? {
678
- r: y(e[1] + e[1]),
679
- g: y(e[2] + e[2]),
680
- b: y(e[3] + e[3]),
681
- format: r ? "name" : "hex"
682
- } : !1)))))))));
683
- }
684
- function k(t) {
685
- return !!x.CSS_UNIT.exec(String(t));
686
- }
687
- var Me = (
688
- /** @class */
689
- (function() {
690
- function t(r, e) {
691
- r === void 0 && (r = ""), e === void 0 && (e = {});
692
- var n;
693
- if (r instanceof t)
694
- return r;
695
- typeof r == "number" && (r = _e(r)), this.originalInput = r;
696
- var a = Se(r);
697
- this.originalInput = r, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (n = e.format) !== null && n !== void 0 ? n : a.format, this.gradientType = e.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = a.ok;
698
- }
699
- return t.prototype.isDark = function() {
700
- return this.getBrightness() < 128;
701
- }, t.prototype.isLight = function() {
702
- return !this.isDark();
703
- }, t.prototype.getBrightness = function() {
704
- var r = this.toRgb();
705
- return (r.r * 299 + r.g * 587 + r.b * 114) / 1e3;
706
- }, t.prototype.getLuminance = function() {
707
- var r = this.toRgb(), e, n, a, o = r.r / 255, i = r.g / 255, s = r.b / 255;
708
- return o <= 0.03928 ? e = o / 12.92 : e = Math.pow((o + 0.055) / 1.055, 2.4), i <= 0.03928 ? n = i / 12.92 : n = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? a = s / 12.92 : a = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * e + 0.7152 * n + 0.0722 * a;
709
- }, t.prototype.getAlpha = function() {
710
- return this.a;
711
- }, t.prototype.setAlpha = function(r) {
712
- return this.a = wt(r), this.roundA = Math.round(100 * this.a) / 100, this;
713
- }, t.prototype.isMonochrome = function() {
714
- var r = this.toHsl().s;
715
- return r === 0;
716
- }, t.prototype.toHsv = function() {
717
- var r = st(this.r, this.g, this.b);
718
- return { h: r.h * 360, s: r.s, v: r.v, a: this.a };
719
- }, t.prototype.toHsvString = function() {
720
- var r = st(this.r, this.g, this.b), e = Math.round(r.h * 360), n = Math.round(r.s * 100), a = Math.round(r.v * 100);
721
- return this.a === 1 ? "hsv(".concat(e, ", ").concat(n, "%, ").concat(a, "%)") : "hsva(".concat(e, ", ").concat(n, "%, ").concat(a, "%, ").concat(this.roundA, ")");
722
- }, t.prototype.toHsl = function() {
723
- var r = it(this.r, this.g, this.b);
724
- return { h: r.h * 360, s: r.s, l: r.l, a: this.a };
725
- }, t.prototype.toHslString = function() {
726
- var r = it(this.r, this.g, this.b), e = Math.round(r.h * 360), n = Math.round(r.s * 100), a = Math.round(r.l * 100);
727
- return this.a === 1 ? "hsl(".concat(e, ", ").concat(n, "%, ").concat(a, "%)") : "hsla(".concat(e, ", ").concat(n, "%, ").concat(a, "%, ").concat(this.roundA, ")");
728
- }, t.prototype.toHex = function(r) {
729
- return r === void 0 && (r = !1), ct(this.r, this.g, this.b, r);
730
- }, t.prototype.toHexString = function(r) {
731
- return r === void 0 && (r = !1), "#" + this.toHex(r);
732
- }, t.prototype.toHex8 = function(r) {
733
- return r === void 0 && (r = !1), me(this.r, this.g, this.b, this.a, r);
734
- }, t.prototype.toHex8String = function(r) {
735
- return r === void 0 && (r = !1), "#" + this.toHex8(r);
736
- }, t.prototype.toHexShortString = function(r) {
737
- return r === void 0 && (r = !1), this.a === 1 ? this.toHexString(r) : this.toHex8String(r);
738
- }, t.prototype.toRgb = function() {
739
- return {
740
- r: Math.round(this.r),
741
- g: Math.round(this.g),
742
- b: Math.round(this.b),
743
- a: this.a
744
- };
745
- }, t.prototype.toRgbString = function() {
746
- var r = Math.round(this.r), e = Math.round(this.g), n = Math.round(this.b);
747
- return this.a === 1 ? "rgb(".concat(r, ", ").concat(e, ", ").concat(n, ")") : "rgba(".concat(r, ", ").concat(e, ", ").concat(n, ", ").concat(this.roundA, ")");
748
- }, t.prototype.toPercentageRgb = function() {
749
- var r = function(e) {
750
- return "".concat(Math.round(p(e, 255) * 100), "%");
751
- };
752
- return {
753
- r: r(this.r),
754
- g: r(this.g),
755
- b: r(this.b),
756
- a: this.a
757
- };
758
- }, t.prototype.toPercentageRgbString = function() {
759
- var r = function(e) {
760
- return Math.round(p(e, 255) * 100);
761
- };
762
- return this.a === 1 ? "rgb(".concat(r(this.r), "%, ").concat(r(this.g), "%, ").concat(r(this.b), "%)") : "rgba(".concat(r(this.r), "%, ").concat(r(this.g), "%, ").concat(r(this.b), "%, ").concat(this.roundA, ")");
763
- }, t.prototype.toName = function() {
764
- if (this.a === 0)
765
- return "transparent";
766
- if (this.a < 1)
767
- return !1;
768
- for (var r = "#" + ct(this.r, this.g, this.b, !1), e = 0, n = Object.entries(J); e < n.length; e++) {
769
- var a = n[e], o = a[0], i = a[1];
770
- if (r === i)
771
- return o;
772
- }
773
- return !1;
774
- }, t.prototype.toString = function(r) {
775
- var e = !!r;
776
- r = r ?? this.format;
777
- var n = !1, a = this.a < 1 && this.a >= 0, o = !e && a && (r.startsWith("hex") || r === "name");
778
- return o ? r === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (r === "rgb" && (n = this.toRgbString()), r === "prgb" && (n = this.toPercentageRgbString()), (r === "hex" || r === "hex6") && (n = this.toHexString()), r === "hex3" && (n = this.toHexString(!0)), r === "hex4" && (n = this.toHex8String(!0)), r === "hex8" && (n = this.toHex8String()), r === "name" && (n = this.toName()), r === "hsl" && (n = this.toHslString()), r === "hsv" && (n = this.toHsvString()), n || this.toHexString());
779
- }, t.prototype.toNumber = function() {
780
- return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
781
- }, t.prototype.clone = function() {
782
- return new t(this.toString());
783
- }, t.prototype.lighten = function(r) {
784
- r === void 0 && (r = 10);
785
- var e = this.toHsl();
786
- return e.l += r / 100, e.l = O(e.l), new t(e);
787
- }, t.prototype.brighten = function(r) {
788
- r === void 0 && (r = 10);
789
- var e = this.toRgb();
790
- return e.r = Math.max(0, Math.min(255, e.r - Math.round(255 * -(r / 100)))), e.g = Math.max(0, Math.min(255, e.g - Math.round(255 * -(r / 100)))), e.b = Math.max(0, Math.min(255, e.b - Math.round(255 * -(r / 100)))), new t(e);
791
- }, t.prototype.darken = function(r) {
792
- r === void 0 && (r = 10);
793
- var e = this.toHsl();
794
- return e.l -= r / 100, e.l = O(e.l), new t(e);
795
- }, t.prototype.tint = function(r) {
796
- return r === void 0 && (r = 10), this.mix("white", r);
797
- }, t.prototype.shade = function(r) {
798
- return r === void 0 && (r = 10), this.mix("black", r);
799
- }, t.prototype.desaturate = function(r) {
800
- r === void 0 && (r = 10);
801
- var e = this.toHsl();
802
- return e.s -= r / 100, e.s = O(e.s), new t(e);
803
- }, t.prototype.saturate = function(r) {
804
- r === void 0 && (r = 10);
805
- var e = this.toHsl();
806
- return e.s += r / 100, e.s = O(e.s), new t(e);
807
- }, t.prototype.greyscale = function() {
808
- return this.desaturate(100);
809
- }, t.prototype.spin = function(r) {
810
- var e = this.toHsl(), n = (e.h + r) % 360;
811
- return e.h = n < 0 ? 360 + n : n, new t(e);
812
- }, t.prototype.mix = function(r, e) {
813
- e === void 0 && (e = 50);
814
- var n = this.toRgb(), a = new t(r).toRgb(), o = e / 100, i = {
815
- r: (a.r - n.r) * o + n.r,
816
- g: (a.g - n.g) * o + n.g,
817
- b: (a.b - n.b) * o + n.b,
818
- a: (a.a - n.a) * o + n.a
819
- };
820
- return new t(i);
821
- }, t.prototype.analogous = function(r, e) {
822
- r === void 0 && (r = 6), e === void 0 && (e = 30);
823
- var n = this.toHsl(), a = 360 / e, o = [this];
824
- for (n.h = (n.h - (a * r >> 1) + 720) % 360; --r; )
825
- n.h = (n.h + a) % 360, o.push(new t(n));
826
- return o;
827
- }, t.prototype.complement = function() {
828
- var r = this.toHsl();
829
- return r.h = (r.h + 180) % 360, new t(r);
830
- }, t.prototype.monochromatic = function(r) {
831
- r === void 0 && (r = 6);
832
- for (var e = this.toHsv(), n = e.h, a = e.s, o = e.v, i = [], s = 1 / r; r--; )
833
- i.push(new t({ h: n, s: a, v: o })), o = (o + s) % 1;
834
- return i;
835
- }, t.prototype.splitcomplement = function() {
836
- var r = this.toHsl(), e = r.h;
837
- return [
838
- this,
839
- new t({ h: (e + 72) % 360, s: r.s, l: r.l }),
840
- new t({ h: (e + 216) % 360, s: r.s, l: r.l })
841
- ];
842
- }, t.prototype.onBackground = function(r) {
843
- var e = this.toRgb(), n = new t(r).toRgb(), a = e.a + n.a * (1 - e.a);
844
- return new t({
845
- r: (e.r * e.a + n.r * n.a * (1 - e.a)) / a,
846
- g: (e.g * e.a + n.g * n.a * (1 - e.a)) / a,
847
- b: (e.b * e.a + n.b * n.a * (1 - e.a)) / a,
848
- a
849
- });
850
- }, t.prototype.triad = function() {
851
- return this.polyad(3);
852
- }, t.prototype.tetrad = function() {
853
- return this.polyad(4);
854
- }, t.prototype.polyad = function(r) {
855
- for (var e = this.toHsl(), n = e.h, a = [this], o = 360 / r, i = 1; i < r; i++)
856
- a.push(new t({ h: (n + i * o) % 360, s: e.s, l: e.l }));
857
- return a;
858
- }, t.prototype.equals = function(r) {
859
- return this.toRgbString() === new t(r).toRgbString();
860
- }, t;
861
- })()
862
- );
863
- function M(t, r = 20) {
864
- return t.mix("#141414", r).toString();
865
- }
866
- function $e(t) {
867
- const r = xt(), e = F("button");
868
- return h(() => {
869
- let n = {}, a = t.color;
870
- if (a) {
871
- const o = a.match(/var\((.*?)\)/);
872
- o && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));
873
- const i = new Me(a), s = t.dark ? i.tint(20).toString() : M(i, 20);
874
- if (t.plain)
875
- n = e.cssVarBlock({
876
- "bg-color": t.dark ? M(i, 90) : i.tint(90).toString(),
877
- "text-color": a,
878
- "border-color": t.dark ? M(i, 50) : i.tint(50).toString(),
879
- "hover-text-color": `var(${e.cssVarName("color-white")})`,
880
- "hover-bg-color": a,
881
- "hover-border-color": a,
882
- "active-bg-color": s,
883
- "active-text-color": `var(${e.cssVarName("color-white")})`,
884
- "active-border-color": s
885
- }), r.value && (n[e.cssVarBlockName("disabled-bg-color")] = t.dark ? M(i, 90) : i.tint(90).toString(), n[e.cssVarBlockName("disabled-text-color")] = t.dark ? M(i, 50) : i.tint(50).toString(), n[e.cssVarBlockName("disabled-border-color")] = t.dark ? M(i, 80) : i.tint(80).toString());
886
- else {
887
- const f = t.dark ? M(i, 30) : i.tint(30).toString(), m = i.isDark() ? `var(${e.cssVarName("color-white")})` : `var(${e.cssVarName("color-black")})`;
888
- if (n = e.cssVarBlock({
889
- "bg-color": a,
890
- "text-color": m,
891
- "border-color": a,
892
- "hover-bg-color": f,
893
- "hover-text-color": m,
894
- "hover-border-color": f,
895
- "active-bg-color": s,
896
- "active-border-color": s
897
- }), r.value) {
898
- const v = t.dark ? M(i, 50) : i.tint(50).toString();
899
- n[e.cssVarBlockName("disabled-bg-color")] = v, n[e.cssVarBlockName("disabled-text-color")] = t.dark ? "rgba(255, 255, 255, 0.5)" : `var(${e.cssVarName("color-white")})`, n[e.cssVarBlockName("disabled-border-color")] = v;
900
- }
901
- }
902
- }
903
- return n;
904
- });
905
- }
906
- const Ne = I({
907
- name: "ElButton",
908
- __name: "button",
909
- props: U,
910
- emits: de,
911
- setup(t, { expose: r, emit: e }) {
912
- const n = t, a = e, o = $e(n), i = F("button"), {
913
- _ref: s,
914
- _size: f,
915
- _type: m,
916
- _disabled: v,
917
- _props: _,
918
- _plain: H,
919
- _round: C,
920
- _text: T,
921
- shouldAddSpace: c,
922
- handleClick: d
923
- } = ue(n, a), u = h(() => [
924
- i.b(),
925
- i.m(m.value),
926
- i.m(f.value),
927
- i.is("disabled", v.value),
928
- i.is("loading", n.loading),
929
- i.is("plain", H.value),
930
- i.is("round", C.value),
931
- i.is("circle", n.circle),
932
- i.is("text", T.value),
933
- i.is("link", n.link),
934
- i.is("has-bg", n.bg)
935
- ]);
936
- return r({
937
- ref: s,
938
- size: f,
939
- type: m,
940
- disabled: v,
941
- shouldAddSpace: c
942
- }), (l, b) => (S(), B(G(l.tag), lt({
943
- ref_key: "_ref",
944
- ref: s
945
- }, g(_), {
946
- class: u.value,
947
- style: g(o),
948
- onClick: g(d)
949
- }), {
950
- default: V(() => [
951
- l.loading ? (S(), P(
952
- It,
953
- { key: 0 },
954
- [
955
- l.$slots.loading ? R(l.$slots, "loading", { key: 0 }) : (S(), B(g(at), {
956
- key: 1,
957
- class: W(g(i).is("loading"))
958
- }, {
959
- default: V(() => [
960
- (S(), B(G(l.loadingIcon)))
961
- ]),
962
- _: 1
963
- }, 8, ["class"]))
964
- ],
965
- 64
966
- )) : l.icon || l.$slots.icon ? (S(), B(g(at), { key: 1 }, {
967
- default: V(() => [
968
- l.icon ? (S(), B(G(l.icon), { key: 0 })) : R(l.$slots, "icon", { key: 1 })
969
- ]),
970
- _: 3
971
- })) : tt("v-if", !0),
972
- l.$slots.default ? (S(), P(
973
- "span",
974
- {
975
- key: 2,
976
- class: W({ [g(i).em("text", "expand")]: g(c) })
977
- },
978
- [
979
- R(l.$slots, "default")
980
- ],
981
- 2
982
- )) : tt("v-if", !0)
983
- ]),
984
- _: 3
985
- }, 16, ["class", "style", "onClick"]));
986
- }
987
- });
988
- var Be = /* @__PURE__ */ Q(Ne, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);
989
- const Ae = {
990
- size: U.size,
991
- type: U.type,
992
- direction: {
993
- type: j(String),
994
- values: ["horizontal", "vertical"],
995
- default: "horizontal"
996
- }
997
- }, Ee = I({
998
- name: "ElButtonGroup",
999
- __name: "button-group",
1000
- props: Ae,
1001
- setup(t) {
1002
- const r = t;
1003
- Rt(
1004
- kt,
1005
- Vt({
1006
- size: et(r, "size"),
1007
- type: et(r, "type")
1008
- })
1009
- );
1010
- const e = F("button");
1011
- return (n, a) => (S(), P(
1012
- "div",
1013
- {
1014
- class: W([g(e).b("group"), g(e).bm("group", r.direction)])
1015
- },
1016
- [
1017
- R(n.$slots, "default")
1018
- ],
1019
- 2
1020
- ));
1021
- }
1022
- });
1023
- var Mt = /* @__PURE__ */ Q(Ee, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);
1024
- const $t = yt(Be, {
1025
- ButtonGroup: Mt
1026
- });
1027
- Qt(Mt);
1028
- const Ie = /* @__PURE__ */ I({
1029
- __name: "TestComp",
1030
- setup(t) {
1031
- const r = E(0);
1032
- function e() {
1033
- r.value = r.value + 1, ht({
1034
- message: `第次${r.value}点击!`,
1035
- type: "success"
1036
- });
1037
- }
1038
- return (n, a) => {
1039
- const o = $t;
1040
- return S(), B(o, { onClick: e }, {
1041
- default: V(() => [
1042
- ft(dt(g(r)), 1)
1043
- ]),
1044
- _: 1
1045
- });
1046
- };
1047
- }
1048
- }), Re = /* @__PURE__ */ I({
1049
- __name: "BtnComp",
1050
- setup(t) {
1051
- const r = E(0);
1052
- function e() {
1053
- r.value = r.value + 100, ht({
1054
- message: `第次${r.value / 100}点击!`,
1055
- type: "warning"
1056
- });
1057
- }
1058
- return (n, a) => {
1059
- const o = $t;
1060
- return S(), B(o, { onClick: e }, {
1061
- default: V(() => [
1062
- ft(dt(g(r)), 1)
1063
- ]),
1064
- _: 1
1065
- });
1066
- };
1067
- }
1068
- });
1069
- export {
1070
- Ie as BtnComp1,
1071
- Re as BtnComp100
1072
- };
File without changes