@soybeanjs/vue-admin-tab
Version:
a layout component of admin template, support vue2 and vue3
16 lines (14 loc) • 21.2 kB
JavaScript
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue");function ae(t){let e=0;for(let n=0;n<t.length;++n)t[n]==="&"&&++e;return e}const Q=/\s*,(?![^(]*\))\s*/g,se=/\s+/g;function ue(t,e){const n=[];return e.split(Q).forEach(o=>{let r=ae(o);if(r){if(r===1){t.forEach(i=>{n.push(o.replace("&",i))});return}}else{t.forEach(i=>{n.push((i&&i+" ")+o)});return}let s=[o];for(;r--;){const i=[];s.forEach(u=>{t.forEach(l=>{i.push(u.replace("&",l))})}),s=i}s.forEach(i=>n.push(i))}),n}function le(t,e){const n=[];return e.split(Q).forEach(o=>{t.forEach(r=>{n.push((r&&r+" ")+o)})}),n}function fe(t){let e=[""];return t.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?e=ue(e,n):e=le(e,n))}),e.join(", ").replace(se," ")}function q(t){if(!t)return;const e=t.parentElement;e&&e.removeChild(t)}function I(t){return document.querySelector(`style[cssr-id="${t}"]`)}function ce(t){const e=document.createElement("style");return e.setAttribute("cssr-id",t),e}function C(t){return t?/^\s*@(s|m)/.test(t):!1}const de=/[A-Z]/g;function X(t){return t.replace(de,e=>"-"+e.toLowerCase())}function pe(t,e=" "){return typeof t=="object"&&t!==null?` {
`+Object.entries(t).map(n=>e+` ${X(n[0])}: ${n[1]};`).join(`
`)+`
`+e+"}":`: ${t};`}function he(t,e,n){return typeof t=="function"?t({context:e.context,props:n}):t}function P(t,e,n,o){if(!e)return"";const r=he(e,n,o);if(!r)return"";if(typeof r=="string")return`${t} {
${r}
}`;const s=Object.keys(r);if(s.length===0)return n.config.keepEmptyBlock?t+` {
}`:"";const i=t?[t+" {"]:[];return s.forEach(u=>{const l=r[u];if(u==="raw"){i.push(`
`+l+`
`);return}u=X(u),l!=null&&i.push(` ${u}${pe(l)}`)}),t&&i.push("}"),i.join(`
`)}function z(t,e,n){t&&t.forEach(o=>{if(Array.isArray(o))z(o,e,n);else if(typeof o=="function"){const r=o(e);Array.isArray(r)?z(r,e,n):r&&n(r)}else o&&n(o)})}function ee(t,e,n,o,r,s){const i=t.$;let u="";if(!i||typeof i=="string")C(i)?u=i:e.push(i);else if(typeof i=="function"){const c=i({context:o.context,props:r});C(c)?u=c:e.push(c)}else if(i.before&&i.before(o.context),!i.$||typeof i.$=="string")C(i.$)?u=i.$:e.push(i.$);else if(i.$){const c=i.$({context:o.context,props:r});C(c)?u=c:e.push(c)}const l=fe(e),f=P(l,t.props,o,r);u?(n.push(`${u} {`),s&&f&&s.insertRule(`${u} {
${f}
}
`)):(s&&f&&s.insertRule(f),!s&&f.length&&n.push(f)),t.children&&z(t.children,{context:o.context,props:r},c=>{if(typeof c=="string"){const d=P(l,{raw:c},o,r);s?s.insertRule(d):n.push(d)}else ee(c,e,n,o,r,s)}),e.pop(),u&&n.push("}"),i&&i.after&&i.after(o.context)}function te(t,e,n,o=!1){const r=[];return ee(t,[],r,e,n,o?t.instance.__styleSheet:void 0),o?"":r.join(`
`)}function me(t){for(var e=0,n,o=0,r=t.length;r>=4;++o,r-=4)n=t.charCodeAt(o)&255|(t.charCodeAt(++o)&255)<<8|(t.charCodeAt(++o)&255)<<16|(t.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(o+2)&255)<<16;case 2:e^=(t.charCodeAt(o+1)&255)<<8;case 1:e^=t.charCodeAt(o)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function be(t,e,n){const{els:o}=e;if(n===void 0)o.forEach(q),e.els=[];else{const r=I(n);r&&o.includes(r)&&(q(r),e.els=o.filter(s=>s!==r))}}function F(t,e){t.push(e)}function ge(t,e,n,o,r,s,i,u,l){if(s&&!l){if(n===void 0){console.error("[css-render/mount]: `id` is required in `silent` mode.");return}const h=window.__cssrContext;h[n]||(h[n]=!0,te(e,t,o,s));return}let f;if(n===void 0&&(f=e.render(o),n=me(f)),l){l.adapter(n,f??e.render(o));return}const c=I(n);if(c!==null&&!i)return c;const d=c??ce(n);if(f===void 0&&(f=e.render(o)),d.textContent=f,c!==null)return c;if(u){const h=document.head.querySelector(`meta[name="${u}"]`);if(h)return document.head.insertBefore(d,h),F(e.els,d),d}return r?document.head.insertBefore(d,document.head.querySelector("style, link")):document.head.appendChild(d),F(e.els,d),d}function ve(t){return te(this,this.instance,t)}function ye(t={}){const{id:e,ssr:n,props:o,head:r=!1,silent:s=!1,force:i=!1,anchorMetaName:u}=t;return ge(this.instance,this,e,o,r,s,i,u,n)}function xe(t={}){const{id:e}=t;be(this.instance,this,e)}const w=function(t,e,n,o){return{instance:t,$:e,props:n,children:o,els:[],render:ve,mount:ye,unmount:xe}},_e=function(t,e,n,o){return Array.isArray(e)?w(t,{$:null},null,e):Array.isArray(n)?w(t,e,null,n):Array.isArray(o)?w(t,e,n,o):w(t,e,n,null)};function V(t={}){let e=null;const n={c:(...o)=>_e(n,...o),use:(o,...r)=>o.install(n,...r),find:I,context:{},config:t,get __styleSheet(){if(!e){const o=document.createElement("style");return document.head.appendChild(o),e=document.styleSheets[document.styleSheets.length-1],e}return e}};return n}function L(t=!1){const e=a.ref(t);function n(i){e.value=i}function o(){n(!0)}function r(){n(!1)}function s(){n(!e.value)}return{bool:e,setBool:n,setTrue:o,setFalse:r,toggle:s}}const Ce={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",class:"iconify iconify--jam",preserveAspectRatio:"xMidYMid meet",viewBox:"-6 -6 24 24"},we=a.createElementVNode("path",{fill:"currentColor",d:"m7.314 5.9l3.535-3.536A1 1 0 1 0 9.435.95L5.899 4.485L2.364.95A1 1 0 1 0 .95 2.364l3.535 3.535L.95 9.435a1 1 0 1 0 1.414 1.414l3.535-3.535l3.536 3.535a1 1 0 1 0 1.414-1.414L7.314 5.899z"},null,-1),ke=[we],$e=a.defineComponent({name:"SvgClose",__name:"SvgClose",setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("svg",Ce,ke))}}),Be={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",class:"iconify iconify--jam",preserveAspectRatio:"xMidYMid meet",viewBox:"-2 -2 24 24"},Ee=a.createElementVNode("path",{fill:"currentColor",d:"m11.414 10l2.829-2.828a1 1 0 1 0-1.415-1.415L10 8.586L7.172 5.757a1 1 0 0 0-1.415 1.415L8.586 10l-2.829 2.828a1 1 0 0 0 1.415 1.415L10 11.414l2.828 2.829a1 1 0 0 0 1.415-1.415L11.414 10zM10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10s-4.477 10-10 10z"},null,-1),Me=[Ee],Ae=a.defineComponent({name:"SvgCloseCircle",__name:"SvgCloseCircle",setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("svg",Be,Me))}}),ne=a.defineComponent({name:"IconClose",__name:"IconClose",props:{isActive:{type:Boolean},defaultColor:{default:"#9ca3af"},activeColor:{default:"#1890ff"}},setup(t){const{bool:e,setTrue:n,setFalse:o}=L(),{c:r}=V(),s=r(".admin-tab__icon",{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",width:"18px",height:"18px",fontSize:"14px"},[r("&-fade",{},[r("&-enter-active, &-leave-active",{transition:"opacity 0.3s ease-in-out"}),r("&-enter-from, &-leave-to",{opacity:0})]),r("&-svg",{position:"absolute",width:"16px",height:"16px"})]);return s.render(),s.mount(),(i,u)=>(a.openBlock(),a.createElementBlock("div",{class:"admin-tab__icon",style:a.normalizeStyle({color:i.isActive?i.activeColor:i.defaultColor}),onMouseenter:u[0]||(u[0]=(...l)=>a.unref(n)&&a.unref(n)(...l)),onMouseleave:u[1]||(u[1]=(...l)=>a.unref(o)&&a.unref(o)(...l))},[a.createVNode(a.Transition,{name:"admin-tab__icon-fade"},{default:a.withCtx(()=>[a.unref(e)?(a.openBlock(),a.createBlock(Ae,{key:"hover",class:"admin-tab__icon-svg"})):(a.openBlock(),a.createBlock($e,{key:"unhover",class:"admin-tab__icon-svg"}))]),_:1})],36))}});var Ne={grad:.9,turn:360,rad:360/(2*Math.PI)},v=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},p=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n+0},m=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t>e?t:e},oe=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},O=function(t){return{r:m(t.r,0,255),g:m(t.g,0,255),b:m(t.b,0,255),a:m(t.a)}},B=function(t){return{r:p(t.r),g:p(t.g),b:p(t.b),a:p(t.a,3)}},ze=/^#([0-9a-f]{3,8})$/i,k=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},re=function(t){var e=t.r,n=t.g,o=t.b,r=t.a,s=Math.max(e,n,o),i=s-Math.min(e,n,o),u=i?s===e?(n-o)/i:s===n?2+(o-e)/i:4+(e-n)/i:0;return{h:60*(u<0?u+6:u),s:s?i/s*100:0,v:s/255*100,a:r}},ie=function(t){var e=t.h,n=t.s,o=t.v,r=t.a;e=e/360*6,n/=100,o/=100;var s=Math.floor(e),i=o*(1-n),u=o*(1-(e-s)*n),l=o*(1-(1-e+s)*n),f=s%6;return{r:255*[o,u,i,i,l,o][f],g:255*[l,o,o,u,i,i][f],b:255*[i,i,l,o,o,u][f],a:r}},W=function(t){return{h:oe(t.h),s:m(t.s,0,100),l:m(t.l,0,100),a:m(t.a)}},Y=function(t){return{h:p(t.h),s:p(t.s),l:p(t.l),a:p(t.a,3)}},D=function(t){return ie((n=(e=t).s,{h:e.h,s:(n*=((o=e.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:e.a}));var e,n,o},x=function(t){return{h:(e=re(t)).h,s:(r=(200-(n=e.s))*(o=e.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:e.a};var e,n,o,r},Se=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Re=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ie=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ve=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,S={string:[[function(t){var e=ze.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?p(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?p(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Ie.exec(t)||Ve.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:O({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=Se.exec(t)||Re.exec(t);if(!e)return null;var n,o,r=W({h:(n=e[1],o=e[2],o===void 0&&(o="deg"),Number(n)*(Ne[o]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return D(r)},"hsl"]],object:[[function(t){var e=t.r,n=t.g,o=t.b,r=t.a,s=r===void 0?1:r;return v(e)&&v(n)&&v(o)?O({r:Number(e),g:Number(n),b:Number(o),a:Number(s)}):null},"rgb"],[function(t){var e=t.h,n=t.s,o=t.l,r=t.a,s=r===void 0?1:r;if(!v(e)||!v(n)||!v(o))return null;var i=W({h:Number(e),s:Number(n),l:Number(o),a:Number(s)});return D(i)},"hsl"],[function(t){var e=t.h,n=t.s,o=t.v,r=t.a,s=r===void 0?1:r;if(!v(e)||!v(n)||!v(o))return null;var i=function(u){return{h:oe(u.h),s:m(u.s,0,100),v:m(u.v,0,100),a:m(u.a)}}({h:Number(e),s:Number(n),v:Number(o),a:Number(s)});return ie(i)},"hsv"]]},U=function(t,e){for(var n=0;n<e.length;n++){var o=e[n][0](t);if(o)return[o,e[n][1]]}return[null,void 0]},Le=function(t){return typeof t=="string"?U(t.trim(),S.string):typeof t=="object"&&t!==null?U(t,S.object):[null,void 0]},E=function(t,e){var n=x(t);return{h:n.h,s:m(n.s+100*e,0,100),l:n.l,a:n.a}},M=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},Z=function(t,e){var n=x(t);return{h:n.h,s:n.s,l:m(n.l+100*e,0,100),a:n.a}},R=function(){function t(e){this.parsed=Le(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return p(M(this.rgba),2)},t.prototype.isDark=function(){return M(this.rgba)<.5},t.prototype.isLight=function(){return M(this.rgba)>=.5},t.prototype.toHex=function(){return e=B(this.rgba),n=e.r,o=e.g,r=e.b,i=(s=e.a)<1?k(p(255*s)):"","#"+k(n)+k(o)+k(r)+i;var e,n,o,r,s,i},t.prototype.toRgb=function(){return B(this.rgba)},t.prototype.toRgbString=function(){return e=B(this.rgba),n=e.r,o=e.g,r=e.b,(s=e.a)<1?"rgba("+n+", "+o+", "+r+", "+s+")":"rgb("+n+", "+o+", "+r+")";var e,n,o,r,s},t.prototype.toHsl=function(){return Y(x(this.rgba))},t.prototype.toHslString=function(){return e=Y(x(this.rgba)),n=e.h,o=e.s,r=e.l,(s=e.a)<1?"hsla("+n+", "+o+"%, "+r+"%, "+s+")":"hsl("+n+", "+o+"%, "+r+"%)";var e,n,o,r,s},t.prototype.toHsv=function(){return e=re(this.rgba),{h:p(e.h),s:p(e.s),v:p(e.v),a:p(e.a,3)};var e},t.prototype.invert=function(){return b({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),b(E(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),b(E(this.rgba,-e))},t.prototype.grayscale=function(){return b(E(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),b(Z(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),b(Z(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?b({r:(n=this.rgba).r,g:n.g,b:n.b,a:e}):p(this.rgba.a,3);var n},t.prototype.hue=function(e){var n=x(this.rgba);return typeof e=="number"?b({h:e,s:n.s,l:n.l,a:n.a}):p(n.h)},t.prototype.isEqual=function(e){return this.toHex()===b(e).toHex()},t}(),b=function(t){return t instanceof R?t:new R(t)},G=[],je=function(t){t.forEach(function(e){G.indexOf(e)<0&&(e(R,S),G.push(e))})},g=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t>e?t:e},A=function(t){var e=t/255;return e<.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},N=function(t){return 255*(t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t)},j=96.422,H=100,T=82.521,He=function(t){var e,n,o={x:.9555766*(e=t).x+-.0230393*e.y+.0631636*e.z,y:-.0282895*e.x+1.0099416*e.y+.0210077*e.z,z:.0122982*e.x+-.020483*e.y+1.3299098*e.z};return n={r:N(.032404542*o.x-.015371385*o.y-.004985314*o.z),g:N(-.00969266*o.x+.018760108*o.y+41556e-8*o.z),b:N(556434e-9*o.x-.002040259*o.y+.010572252*o.z),a:t.a},{r:g(n.r,0,255),g:g(n.g,0,255),b:g(n.b,0,255),a:g(n.a)}},Te=function(t){var e=A(t.r),n=A(t.g),o=A(t.b);return function(r){return{x:g(r.x,0,j),y:g(r.y,0,H),z:g(r.z,0,T),a:g(r.a)}}(function(r){return{x:1.0478112*r.x+.0228866*r.y+-.050127*r.z,y:.0295424*r.x+.9904844*r.y+-.0170491*r.z,z:-.0092345*r.x+.0150436*r.y+.7521316*r.z,a:r.a}}({x:100*(.4124564*e+.3575761*n+.1804375*o),y:100*(.2126729*e+.7151522*n+.072175*o),z:100*(.0193339*e+.119192*n+.9503041*o),a:t.a}))},_=216/24389,y=24389/27,J=function(t){var e=Te(t),n=e.x/j,o=e.y/H,r=e.z/T;return n=n>_?Math.cbrt(n):(y*n+16)/116,{l:116*(o=o>_?Math.cbrt(o):(y*o+16)/116)-16,a:500*(n-o),b:200*(o-(r=r>_?Math.cbrt(r):(y*r+16)/116)),alpha:e.a}},qe=function(t,e,n){var o,r=J(t),s=J(e);return function(i){var u=(i.l+16)/116,l=i.a/500+u,f=u-i.b/200;return He({x:(Math.pow(l,3)>_?Math.pow(l,3):(116*l-16)/y)*j,y:(i.l>8?Math.pow((i.l+16)/116,3):i.l/y)*H,z:(Math.pow(f,3)>_?Math.pow(f,3):(116*f-16)/y)*T,a:i.alpha})}({l:g((o={l:r.l*(1-n)+s.l*n,a:r.a*(1-n)+s.a*n,b:r.b*(1-n)+s.b*n,alpha:r.alpha*(1-n)+s.alpha*n}).l,0,400),a:o.a,b:o.b,alpha:g(o.alpha)})};function Pe(t){function e(n,o,r){r===void 0&&(r=5);for(var s=[],i=1/(r-1),u=0;u<=r-1;u++)s.push(n.mix(o,i*u));return s}t.prototype.mix=function(n,o){o===void 0&&(o=.5);var r=n instanceof t?n:new t(n),s=qe(this.toRgb(),r.toRgb(),o);return new t(s)},t.prototype.tints=function(n){return e(this,"#fff",n)},t.prototype.shades=function(n){return e(this,"#000",n)},t.prototype.tones=function(n){return e(this,"#808080",n)}}je([Pe]);function K(t,e){return b(t).alpha(e).toHex()}function Fe(t,e,n){return b(t).mix(e,n).toHex()}const Oe={style:{width:"100%",height:"100%"}},We=a.createStaticVNode('<defs><symbol id="geometry-left" viewBox="0 0 214 36"><path d="M17 0h197v36H0v-2c4.5 0 9-3.5 9-8V8c0-4.5 3.5-8 8-8z"></path></symbol><symbol id="geometry-right" viewBox="0 0 214 36"><use xlink:href="#geometry-left"></use></symbol><clipPath><rect width="100%" height="100%" x="0"></rect></clipPath></defs>',1),Ye={width:"52%",height:"100%"},De=["fill"],Ue={transform:"scale(-1, 1)"},Ze={width:"52%",height:"100%",x:"-100%",y:"0"},Ge=["fill"],Je=a.defineComponent({name:"SvgRadiusBg",__name:"SvgRadiusBg",props:{darkMode:{type:Boolean,default:!1},isActive:{type:Boolean,default:!1},isHover:{type:Boolean,default:!1},primaryColor:{default:"#1890ff"},bgColor:{default:()=>["#ffffff","#18181c"]},hoverBgColor:{default:()=>["#dee1e6","#333333"]},mixColor:{default:()=>["#ffffff","#000000"]},mixRatio:{default:()=>[.2,.3]}},setup(t){const e=t,n=a.computed(()=>{const o=Number(e.darkMode);let r=e.bgColor[o];if(e.isHover&&(r=e.hoverBgColor[o]),e.isActive){const s=e.mixRatio[o];r=Fe(e.mixColor[o],e.primaryColor,s)}return r});return(o,r)=>(a.openBlock(),a.createElementBlock("svg",Oe,[We,(a.openBlock(),a.createElementBlock("svg",Ye,[a.createElementVNode("use",{"xlink:href":"#geometry-left",width:"214",height:"36",fill:n.value},null,8,De)])),a.createElementVNode("g",Ue,[(a.openBlock(),a.createElementBlock("svg",Ze,[a.createElementVNode("use",{"xlink:href":"#geometry-right",width:"214",height:"36",fill:n.value},null,8,Ge)]))])]))}}),Ke={class:"admin-tab__button-tab__preffix"},Qe={key:0,class:"admin-tab__button-tab__icon"},Xe=a.defineComponent({name:"ButtonTab",__name:"ButtonTab",props:{darkMode:{type:Boolean,default:!1},isActive:{type:Boolean,default:!1},primaryColor:{default:"#1890ff"},borderColor:{default:"#e5e7eb"},darkBorderColor:{default:"#ffffff3d"},closable:{type:Boolean,default:!0}},emits:["close"],setup(t,{emit:e}){const n=t,{bool:o,setTrue:r,setFalse:s}=L(),i=a.computed(()=>n.isActive||o.value),u=a.computed(()=>{const d={};if(d.borderColor=n.darkMode?n.darkBorderColor:n.borderColor,i.value&&(d.color=n.primaryColor,d.borderColor=K(n.primaryColor,.3),n.isActive)){const h=n.darkMode?.15:.1;d.backgroundColor=K(n.primaryColor,h)}return d});function l(d){d.stopPropagation(),e("close")}const{c:f}=V(),c=f(".admin-tab__button-tab",{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",height:"30px",paddingLeft:"14px",paddingRight:"6px",borderWidth:"1px",borderStyle:"solid",borderRadius:"2px",cursor:"pointer"},[f("&--unclosable",{paddingRight:"14px !important"}),f("&__preffix",{whiteSpace:"nowrap"}),f("&__icon",{paddingLeft:"10px"})]);return c.render(),c.mount(),(d,h)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["admin-tab__button-tab",{"admin-tab__button-tab--unclosable":!d.closable}]),style:a.normalizeStyle(u.value),onMouseenter:h[0]||(h[0]=(...$)=>a.unref(r)&&a.unref(r)(...$)),onMouseleave:h[1]||(h[1]=(...$)=>a.unref(s)&&a.unref(s)(...$))},[a.createElementVNode("span",Ke,[a.renderSlot(d.$slots,"default")]),d.closable?(a.openBlock(),a.createElementBlock("div",Qe,[a.createVNode(a.unref(ne),{"is-active":i.value,"active-color":d.primaryColor,onClick:l},null,8,["is-active","active-color"])])):a.createCommentVNode("",!0)],38))}}),et={class:"admin-tab__chrome-tab__bg"},tt={class:"admin-tab__chrome-tab__slot"},nt={key:0,class:"admin-tab__chrome-tab__icon"},ot=a.defineComponent({name:"ChromeTab",__name:"ChromeTab",props:{darkMode:{type:Boolean,default:!1},isActive:{type:Boolean,default:!1},primaryColor:{default:"#1890ff"},closable:{type:Boolean,default:!0},bgColor:{default:()=>["#ffffff","#18181c"]},hoverBgColor:{default:()=>["#dee1e6","#3f3c37"]},mixColor:{default:()=>["#ffffff","#000"]},mixRatio:{default:()=>[.13,.35]}},emits:["close"],setup(t,{emit:e}){const{bool:n,setTrue:o,setFalse:r}=L();function s(l){l.stopPropagation(),e("close")}const{c:i}=V(),u=i(".admin-tab__chrome-tab",{position:"relative",display:"inline-flex",alignItems:"center",height:"34px",paddingLeft:"24px",paddingRight:"24px",marginRight:"-18px",cursor:"pointer"},[i("&--active",{zIndex:10}),i("&--hover",{zIndex:9}),i("&__bg",{position:"absolute",left:0,bottom:0,width:"100%",height:"100%",overflow:"hidden"}),i("&__slot",{position:"relative",zIndex:2,whiteSpace:"nowrap"}),i("&__icon",{paddingLeft:"18px"}),i("&__divider",{position:"absolute",right:"7.5px",zIndex:2,width:"1px",height:"16px",backgroundColor:"#1f2225",opacity:1,transition:"opacity 0.3s ease-in-out"},[i("&--hide",{opacity:0}),i("&--dark",{backgroundColor:"rgba(255,255,255,0.9) !important"})])]);return u.render(),u.mount(),(l,f)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["admin-tab__chrome-tab",{"admin-tab__chrome-tab--active":l.isActive,"admin-tab__chrome-tab--hover":a.unref(n)}]),onMouseenter:f[0]||(f[0]=(...c)=>a.unref(o)&&a.unref(o)(...c)),onMouseleave:f[1]||(f[1]=(...c)=>a.unref(r)&&a.unref(r)(...c))},[a.createElementVNode("div",et,[a.createVNode(a.unref(Je),{"dark-mode":l.darkMode,"is-active":l.isActive,"is-hover":a.unref(n),"primary-color":l.primaryColor,"bg-color":l.bgColor,"hover-bg-color":l.hoverBgColor,"mix-color":l.mixColor,"mix-ratio":l.mixRatio},null,8,["dark-mode","is-active","is-hover","primary-color","bg-color","hover-bg-color","mix-color","mix-ratio"])]),a.createElementVNode("span",tt,[a.renderSlot(l.$slots,"default")]),l.closable?(a.openBlock(),a.createElementBlock("div",nt,[a.createVNode(a.unref(ne),{"is-active":l.isActive,"active-color":l.primaryColor,onClick:s},null,8,["is-active","active-color"])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["admin-tab__chrome-tab__divider",{"admin-tab__chrome-tab__divider--hide":a.unref(n)||l.isActive,"admin-tab__chrome-tab__divider--dark":l.darkMode}])},null,2)],34))}});exports.ButtonTab=Xe;exports.ChromeTab=ot;
;