admin.assets.text-3T_RJBzJ.js Maven / Gradle / Ivy
The newest version!
import{b0 as C,bk as l,d as $,b1 as B,b4 as h,bl as z,a as c,bq as T,b7 as _,bS as R,al as i}from"./index-D2gfy4BV.js";const S=C("text",`
transition: color .3s var(--n-bezier);
color: var(--n-text-color);
`,[l("strong",`
font-weight: var(--n-font-weight-strong);
`),l("italic",{fontStyle:"italic"}),l("underline",{textDecoration:"underline"}),l("code",`
line-height: 1.4;
display: inline-block;
font-family: var(--n-font-famliy-mono);
transition:
color .3s var(--n-bezier),
border-color .3s var(--n-bezier),
background-color .3s var(--n-bezier);
box-sizing: border-box;
padding: .05em .35em 0 .35em;
border-radius: var(--n-code-border-radius);
font-size: .9em;
color: var(--n-code-text-color);
background-color: var(--n-code-color);
border: var(--n-code-border);
`)]),V=Object.assign(Object.assign({},h.props),{code:Boolean,type:{type:String,default:"default"},delete:Boolean,strong:Boolean,italic:Boolean,underline:Boolean,depth:[String,Number],tag:String,as:{type:String,validator:()=>!0,default:void 0}}),P=$({name:"Text",props:V,setup(e){const{mergedClsPrefixRef:r,inlineThemeDisabled:n}=B(e),o=h("Typography","-text",S,z,e,r),s=c(()=>{const{depth:a,type:d}=e,u=d==="default"?a===void 0?"textColor":`textColor${a}Depth`:T("textColor",d),{common:{fontWeightStrong:b,fontFamilyMono:g,cubicBezierEaseInOut:m},self:{codeTextColor:x,codeBorderRadius:f,codeColor:v,codeBorder:y,[u]:p}}=o.value;return{"--n-bezier":m,"--n-text-color":p,"--n-font-weight-strong":b,"--n-font-famliy-mono":g,"--n-code-border-radius":f,"--n-code-text-color":x,"--n-code-color":v,"--n-code-border":y}}),t=n?_("text",c(()=>`${e.type[0]}${e.depth||""}`),s,e):void 0;return{mergedClsPrefix:r,compitableTag:R(e,["as","tag"]),cssVars:n?void 0:s,themeClass:t==null?void 0:t.themeClass,onRender:t==null?void 0:t.onRender}},render(){var e,r,n;const{mergedClsPrefix:o}=this;(e=this.onRender)===null||e===void 0||e.call(this);const s=[`${o}-text`,this.themeClass,{[`${o}-text--code`]:this.code,[`${o}-text--delete`]:this.delete,[`${o}-text--strong`]:this.strong,[`${o}-text--italic`]:this.italic,[`${o}-text--underline`]:this.underline}],t=(n=(r=this.$slots).default)===null||n===void 0?void 0:n.call(r);return this.code?i("code",{class:s,style:this.cssVars},this.delete?i("del",null,t):t):this.delete?i("del",{class:s,style:this.cssVars},t):i(this.compitableTag||"span",{class:s,style:this.cssVars},t)}});export{P as _};
© 2015 - 2025 Weber Informatics LLC | Privacy Policy