You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
20 KiB

import{e as Y,c as v,a as To,l as ao,k as wo,f as I,g as x,h as so,b as co,o as V}from"./light-0dfdc1ad.js";import{a as Ho,u as zo}from"./use-config-816d55a6.js";import{u as Do}from"./use-rtl-889b67fe.js";import{i as Io}from"./browser-1654e206.js";import{i as Bo,a as Eo,b as Fo,N as Go}from"./Loading-fead3a83.js";import{u as Ro}from"./use-memo-f04d43e5.js";import{u as Wo}from"./use-form-item-34ce685d.js";import{c as t}from"./create-key-bf4384d6.js";import{u as ko}from"./use-css-vars-class-3ae3b4b3.js";import{c as io}from"./color-to-class-b0332f36.js";import{r as lo,i as Oo,c as Mo}from"./use-merged-state-66be05d7.js";import{u as No}from"./Icon-e3cbad7d.js";import{d as uo,dO as jo,r as j,b3 as Lo,J as _o,a8 as D,k as Ko,f as q}from"./index-f4658ae7.js";import{N as Qo}from"./FadeInExpandTransition-fc975915.js";const Vo=Y("base-wave",`
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
border-radius: inherit;
`),qo=uo({name:"BaseWave",props:{clsPrefix:{type:String,required:!0}},setup(r){No("-base-wave",Vo,jo(r,"clsPrefix"));const C=j(null),m=j(!1);let f=null;return Lo(()=>{f!==null&&window.clearTimeout(f)}),{active:m,selfRef:C,play(){f!==null&&(window.clearTimeout(f),m.value=!1,f=null),_o(()=>{var g;(g=C.value)===null||g===void 0||g.offsetHeight,m.value=!0,f=window.setTimeout(()=>{m.value=!1,f=null},1e3)})}}},render(){const{clsPrefix:r}=this;return D("div",{ref:"selfRef","aria-hidden":!0,class:[`${r}-base-wave`,this.active&&`${r}-base-wave--active`]})}}),{cubicBezierEaseInOut:G}=To;function Xo({duration:r=".2s",delay:C=".1s"}={}){return[v("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),v("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
opacity: 0!important;
margin-left: 0!important;
margin-right: 0!important;
`),v("&.fade-in-width-expand-transition-leave-active",`
overflow: hidden;
transition:
opacity ${r} ${G},
max-width ${r} ${G} ${C},
margin-left ${r} ${G} ${C},
margin-right ${r} ${G} ${C};
`),v("&.fade-in-width-expand-transition-enter-active",`
overflow: hidden;
transition:
opacity ${r} ${G} ${C},
max-width ${r} ${G},
margin-left ${r} ${G},
margin-right ${r} ${G};
`)]}function W(r){return ao(r,[255,255,255,.16])}function X(r){return ao(r,[0,0,0,.12])}const Yo=Ho("n-button-group"),Ao={paddingTiny:"0 6px",paddingSmall:"0 10px",paddingMedium:"0 14px",paddingLarge:"0 18px",paddingRoundTiny:"0 10px",paddingRoundSmall:"0 14px",paddingRoundMedium:"0 18px",paddingRoundLarge:"0 22px",iconMarginTiny:"6px",iconMarginSmall:"6px",iconMarginMedium:"6px",iconMarginLarge:"6px",iconSizeTiny:"14px",iconSizeSmall:"18px",iconSizeMedium:"18px",iconSizeLarge:"20px",rippleDuration:".6s"},Jo=r=>{const{heightTiny:C,heightSmall:m,heightMedium:f,heightLarge:g,borderRadius:k,fontSizeTiny:M,fontSizeSmall:N,fontSizeMedium:A,fontSizeLarge:J,opacityDisabled:U,textColor2:y,textColor3:Z,primaryColorHover:c,primaryColorPressed:S,borderColor:L,primaryColor:H,baseColor:s,infoColor:z,infoColorHover:h,infoColorPressed:e,successColor:i,successColorHover:b,successColorPressed:o,warningColor:$,warningColorHover:P,warningColorPressed:E,errorColor:T,errorColorHover:u,errorColorPressed:F,fontWeight:B,buttonColor2:O,buttonColor2Hover:w,buttonColor2Pressed:l,fontWeightStrong:_}=r;return Object.assign(Object.assign({},Ao),{heightTiny:C,heightSmall:m,heightMedium:f,heightLarge:g,borderRadiusTiny:k,borderRadiusSmall:k,borderRadiusMedium:k,borderRadiusLarge:k,fontSizeTiny:M,fontSizeSmall:N,fontSizeMedium:A,fontSizeLarge:J,opacityDisabled:U,colorOpacitySecondary:"0.16",colorOpacitySecondaryHover:"0.22",colorOpacitySecondaryPressed:"0.28",colorSecondary:O,colorSecondaryHover:w,colorSecondaryPressed:l,colorTertiary:O,colorTertiaryHover:w,colorTertiaryPressed:l,colorQuaternary:"#0000",colorQuaternaryHover:w,colorQuaternaryPressed:l,color:"#0000",colorHover:"#0000",colorPressed:"#0000",colorFocus:"#0000",colorDisabled:"#0000",textColor:y,textColorTertiary:Z,textColorHover:c,textColorPressed:S,textColorFocus:c,textColorDisabled:y,textColorText:y,textColorTextHover:c,textColorTextPressed:S,textColorTextFocus:c,textColorTextDisabled:y,textColorGhost:y,textColorGhostHover:c,textColorGhostPressed:S,textColorGhostFocus:c,textColorGhostDisabled:y,border:`1px solid ${L}`,borderHover:`1px solid ${c}`,borderPressed:`1px solid ${S}`,borderFocus:`1px solid ${c}`,borderDisabled:`1px solid ${L}`,rippleColor:H,colorPrimary:H,colorHoverPrimary:c,colorPressedPrimary:S,colorFocusPrimary:c,colorDisabledPrimary:H,textColorPrimary:s,textColorHoverPrimary:s,textColorPressedPrimary:s,textColorFocusPrimary:s,textColorDisabledPrimary:s,textColorTextPrimary:H,textColorTextHoverPrimary:c,textColorTextPressedPrimary:S,textColorTextFocusPrimary:c,textColorTextDisabledPrimary:y,textColorGhostPrimary:H,textColorGhostHoverPrimary:c,textColorGhostPressedPrimary:S,textColorGhostFocusPrimary:c,textColorGhostDisabledPrimary:H,borderPrimary:`1px solid ${H}`,borderHoverPrimary:`1px solid ${c}`,borderPressedPrimary:`1px solid ${S}`,borderFocusPrimary:`1px solid ${c}`,borderDisabledPrimary:`1px solid ${H}`,rippleColorPrimary:H,colorInfo:z,colorHoverInfo:h,colorPressedInfo:e,colorFocusInfo:h,colorDisabledInfo:z,textColorInfo:s,textColorHoverInfo:s,textColorPressedInfo:s,textColorFocusInfo:s,textColorDisabledInfo:s,textColorTextInfo:z,textColorTextHoverInfo:h,textColorTextPressedInfo:e,textColorTextFocusInfo:h,textColorTextDisabledInfo:y,textColorGhostInfo:z,textColorGhostHoverInfo:h,textColorGhostPressedInfo:e,textColorGhostFocusInfo:h,textColorGhostDisabledInfo:z,borderInfo:`1px solid ${z}`,borderHoverInfo:`1px solid ${h}`,borderPressedInfo:`1px solid ${e}`,borderFocusInfo:`1px solid ${h}`,borderDisabledInfo:`1px solid ${z}`,rippleColorInfo:z,colorSuccess:i,colorHoverSuccess:b,colorPressedSuccess:o,colorFocusSuccess:b,colorDisabledSuccess:i,textColorSuccess:s,textColorHoverSuccess:s,textColorPressedSuccess:s,textColorFocusSuccess:s,textColorDisabledSuccess:s,textColorTextSuccess:i,textColorTextHoverSuccess:b,textColorTextPressedSuccess:o,textColorTextFocusSuccess:b,textColorTextDisabledSuccess:y,textColorGhostSuccess:i,textColorGhostHoverSuccess:b,textColorGhostPressedSuccess:o,textColorGhostFocusSuccess:b,textColorGhostDisabledSuccess:i,borderSuccess:`1px solid ${i}`,borderHoverSuccess:`1px solid ${b}`,borderPressedSuccess:`1px solid ${o}`,borderFocusSuccess:`1px solid ${b}`,borderDisabledSuccess:`1px solid ${i}`,rippleColorSuccess:i,colorWarning:$,colorHoverWarning:P,colorPressedWarning:E,colorFocusWarning:P,colorDisabledWarning:$,textColorWarning:s,textColorHoverWarning:s,textColorPressedWarning:s,textColorFocusWarning:s,textColorDisabledWarning:s,textColorTextWarning:$,textColorTextHoverWarning:P,textColorTextPressedWarning:E,textColorTextFocusWarning:P,textColorTextDisabledWarning:y,textColorGhostWarning:$,textColorGhostHoverWarning:P,textColorGhostPressedWarning:E,textColorGhostFocusWarning:P,textColorGhostDisabledWarning:$,borderWarning:`1px solid ${$}`,borderHoverWarning:`1px solid ${P}`,borderPressedWarning:`1px solid ${E}`,borderFocusWarning:`1px solid ${P}`,borderDisabledWarning:`1px solid ${$}`,rippleColorWarning:$,colorError:T,colorHoverError:u,colorPressedError:F,colorFocusError:u,colorDisabledError:T,textColorError:s,textColorHoverError:s,textColorPressedError:s,textColorFocusError:s,textColorDisabledError:s,textColorTextError:T,textColorTextHoverError:u,textColorTextPressedError:F,textColorTextFocusError:u,textColorTextDisabledError:y,textColorGhostError:T,textColorGhostHoverError:u,textColorGhostPressedError:F,textColorGhostFocusError:u,textColorGhostDisabledError:T,borderError:`1px solid ${T}`,borderHoverError:`1px solid ${u}`,borderPressedError:`1px solid ${F}`,borderFocusError:`1px solid ${u}`,borderDisabledError:`1px solid ${T}`,rippleColorError:T,waveOpacity:"0.6",fontWeight:B,fontWeightStrong:_})},Uo={name:"Button",common:wo,self:Jo},Zo=Uo,or=v([Y("button",`
margin: 0;
font-weight: var(--n-font-weight);
line-height: 1;
font-family: inherit;
padding: var(--n-padding);
height: var(--n-height);
font-size: var(--n-font-size);
border-radius: var(--n-border-radius);
color: var(--n-text-color);
background-color: var(--n-color);
width: var(--n-width);
white-space: nowrap;
outline: none;
position: relative;
z-index: auto;
border: none;
display: inline-flex;
flex-wrap: nowrap;
flex-shrink: 0;
align-items: center;
justify-content: center;
user-select: none;
-webkit-user-select: none;
text-align: center;
cursor: pointer;
text-decoration: none;
transition:
color .3s var(--n-bezier),
background-color .3s var(--n-bezier),
opacity .3s var(--n-bezier),
border-color .3s var(--n-bezier);
`,[I("color",[x("border",{borderColor:"var(--n-border-color)"}),I("disabled",[x("border",{borderColor:"var(--n-border-color-disabled)"})]),so("disabled",[v("&:focus",[x("state-border",{borderColor:"var(--n-border-color-focus)"})]),v("&:hover",[x("state-border",{borderColor:"var(--n-border-color-hover)"})]),v("&:active",[x("state-border",{borderColor:"var(--n-border-color-pressed)"})]),I("pressed",[x("state-border",{borderColor:"var(--n-border-color-pressed)"})])])]),I("disabled",{backgroundColor:"var(--n-color-disabled)",color:"var(--n-text-color-disabled)"},[x("border",{border:"var(--n-border-disabled)"})]),so("disabled",[v("&:focus",{backgroundColor:"var(--n-color-focus)",color:"var(--n-text-color-focus)"},[x("state-border",{border:"var(--n-border-focus)"})]),v("&:hover",{backgroundColor:"var(--n-color-hover)",color:"var(--n-text-color-hover)"},[x("state-border",{border:"var(--n-border-hover)"})]),v("&:active",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[x("state-border",{border:"var(--n-border-pressed)"})]),I("pressed",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[x("state-border",{border:"var(--n-border-pressed)"})])]),I("loading","cursor: wait;"),Y("base-wave",`
pointer-events: none;
top: 0;
right: 0;
bottom: 0;
left: 0;
animation-iteration-count: 1;
animation-duration: var(--n-ripple-duration);
animation-timing-function: var(--n-bezier-ease-out), var(--n-bezier-ease-out);
`,[I("active",{zIndex:1,animationName:"button-wave-spread, button-wave-opacity"})]),Bo&&"MozBoxSizing"in document.createElement("div").style?v("&::moz-focus-inner",{border:0}):null,x("border, state-border",`
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
border-radius: inherit;
transition: border-color .3s var(--n-bezier);
pointer-events: none;
`),x("border",{border:"var(--n-border)"}),x("state-border",{border:"var(--n-border)",borderColor:"#0000",zIndex:1}),x("icon",`
margin: var(--n-icon-margin);
margin-left: 0;
height: var(--n-icon-size);
width: var(--n-icon-size);
max-width: var(--n-icon-size);
font-size: var(--n-icon-size);
position: relative;
flex-shrink: 0;
`,[Y("icon-slot",`
height: var(--n-icon-size);
width: var(--n-icon-size);
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
`,[Eo({top:"50%",originalTransform:"translateY(-50%)"})]),Xo()]),x("content",`
display: flex;
align-items: center;
flex-wrap: nowrap;
min-width: 0;
`,[v("~",[x("icon",{margin:"var(--n-icon-margin)",marginRight:0})])]),I("block",`
display: flex;
width: 100%;
`),I("dashed",[x("border, state-border",{borderStyle:"dashed !important"})]),I("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),v("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),v("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),rr=Object.assign(Object.assign({},co.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!Io}}),bo=uo({name:"Button",props:rr,setup(r){const C=j(null),m=j(null),f=j(!1),g=Ro(()=>!r.quaternary&&!r.tertiary&&!r.secondary&&!r.text&&(!r.color||r.ghost||r.dashed)&&r.bordered),k=Ko(Yo,{}),{mergedSizeRef:M}=Wo({},{defaultSize:"medium",mergedSize:e=>{const{size:i}=r;if(i)return i;const{size:b}=k;if(b)return b;const{mergedSize:o}=e||{};return o?o.value:"medium"}}),N=q(()=>r.focusable&&!r.disabled),A=e=>{var i;N.value||e.preventDefault(),!r.nativeFocusBehavior&&(e.preventDefault(),!r.disabled&&N.value&&((i=C.value)===null||i===void 0||i.focus({preventScroll:!0})))},J=e=>{var i;if(!r.disabled&&!r.loading){const{onClick:b}=r;b&&Mo(b,e),r.text||(i=m.value)===null||i===void 0||i.play()}},U=e=>{switch(e.key){case"Enter":if(!r.keyboard)return;f.value=!1}},y=e=>{switch(e.key){case"Enter":if(!r.keyboard||r.loading){e.preventDefault();return}f.value=!0}},Z=()=>{f.value=!1},{inlineThemeDisabled:c,mergedClsPrefixRef:S,mergedRtlRef:L}=zo(r),H=co("Button","-button",or,Zo,r,S),s=Do("Button",L,S),z=q(()=>{const e=H.value,{common:{cubicBezierEaseInOut:i,cubicBezierEaseOut:b},self:o}=e,{rippleDuration:$,opacityDisabled:P,fontWeight:E,fontWeightStrong:T}=o,u=M.value,{dashed:F,type:B,ghost:O,text:w,color:l,round:_,circle:oo,textColor:R,secondary:xo,tertiary:to,quaternary:fo,strong:po}=r,ho={"font-weight":po?T:E};let a={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const K=B==="tertiary",no=B==="default",n=K?"default":B;if(w){const d=R||l;a={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":d||o[t("textColorText",n)],"--n-text-color-hover":d?W(d):o[t("textColorTextHover",n)],"--n-text-color-pressed":d?X(d):o[t("textColorTextPressed",n)],"--n-text-color-focus":d?W(d):o[t("textColorTextHover",n)],"--n-text-color-disabled":d||o[t("textColorTextDisabled",n)]}}else if(O||F){const d=R||l;a={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":l||o[t("rippleColor",n)],"--n-text-color":d||o[t("textColorGhost",n)],"--n-text-color-hover":d?W(d):o[t("textColorGhostHover",n)],"--n-text-color-pressed":d?X(d):o[t("textColorGhostPressed",n)],"--n-text-color-focus":d?W(d):o[t("textColorGhostHover",n)],"--n-text-color-disabled":d||o[t("textColorGhostDisabled",n)]}}else if(xo){const d=no?o.textColor:K?o.textColorTertiary:o[t("color",n)],p=l||d,Q=B!=="default"&&B!=="tertiary";a={"--n-color":Q?V(p,{alpha:Number(o.colorOpacitySecondary)}):o.colorSecondary,"--n-color-hover":Q?V(p,{alpha:Number(o.colorOpacitySecondaryHover)}):o.colorSecondaryHover,"--n-color-pressed":Q?V(p,{alpha:Number(o.colorOpacitySecondaryPressed)}):o.colorSecondaryPressed,"--n-color-focus":Q?V(p,{alpha:Number(o.colorOpacitySecondaryHover)}):o.colorSecondaryHover,"--n-color-disabled":o.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":p,"--n-text-color-hover":p,"--n-text-color-pressed":p,"--n-text-color-focus":p,"--n-text-color-disabled":p}}else if(to||fo){const d=no?o.textColor:K?o.textColorTertiary:o[t("color",n)],p=l||d;to?(a["--n-color"]=o.colorTertiary,a["--n-color-hover"]=o.colorTertiaryHover,a["--n-color-pressed"]=o.colorTertiaryPressed,a["--n-color-focus"]=o.colorSecondaryHover,a["--n-color-disabled"]=o.colorTertiary):(a["--n-color"]=o.colorQuaternary,a["--n-color-hover"]=o.colorQuaternaryHover,a["--n-color-pressed"]=o.colorQuaternaryPressed,a["--n-color-focus"]=o.colorQuaternaryHover,a["--n-color-disabled"]=o.colorQuaternary),a["--n-ripple-color"]="#0000",a["--n-text-color"]=p,a["--n-text-color-hover"]=p,a["--n-text-color-pressed"]=p,a["--n-text-color-focus"]=p,a["--n-text-color-disabled"]=p}else a={"--n-color":l||o[t("color",n)],"--n-color-hover":l?W(l):o[t("colorHover",n)],"--n-color-pressed":l?X(l):o[t("colorPressed",n)],"--n-color-focus":l?W(l):o[t("colorFocus",n)],"--n-color-disabled":l||o[t("colorDisabled",n)],"--n-ripple-color":l||o[t("rippleColor",n)],"--n-text-color":R||(l?o.textColorPrimary:K?o.textColorTertiary:o[t("textColor",n)]),"--n-text-color-hover":R||(l?o.textColorHoverPrimary:o[t("textColorHover",n)]),"--n-text-color-pressed":R||(l?o.textColorPressedPrimary:o[t("textColorPressed",n)]),"--n-text-color-focus":R||(l?o.textColorFocusPrimary:o[t("textColorFocus",n)]),"--n-text-color-disabled":R||(l?o.textColorDisabledPrimary:o[t("textColorDisabled",n)])};let ro={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};w?ro={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:ro={"--n-border":o[t("border",n)],"--n-border-hover":o[t("borderHover",n)],"--n-border-pressed":o[t("borderPressed",n)],"--n-border-focus":o[t("borderFocus",n)],"--n-border-disabled":o[t("borderDisabled",n)]};const{[t("height",u)]:eo,[t("fontSize",u)]:vo,[t("padding",u)]:Co,[t("paddingRound",u)]:mo,[t("iconSize",u)]:go,[t("borderRadius",u)]:yo,[t("iconMargin",u)]:Po,waveOpacity:So}=o,$o={"--n-width":oo&&!w?eo:"initial","--n-height":w?"initial":eo,"--n-font-size":vo,"--n-padding":oo||w?"initial":_?mo:Co,"--n-icon-size":go,"--n-icon-margin":Po,"--n-border-radius":w?"initial":oo||_?eo:yo};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":i,"--n-bezier-ease-out":b,"--n-ripple-duration":$,"--n-opacity-disabled":P,"--n-wave-opacity":So},ho),a),ro),$o)}),h=c?ko("button",q(()=>{let e="";const{dashed:i,type:b,ghost:o,text:$,color:P,round:E,circle:T,textColor:u,secondary:F,tertiary:B,quaternary:O,strong:w}=r;i&&(e+="a"),o&&(e+="b"),$&&(e+="c"),E&&(e+="d"),T&&(e+="e"),F&&(e+="f"),B&&(e+="g"),O&&(e+="h"),w&&(e+="i"),P&&(e+="j"+io(P)),u&&(e+="k"+io(u));const{value:l}=M;return e+="l"+l[0],e+="m"+b[0],e}),z,r):void 0;return{selfElRef:C,waveElRef:m,mergedClsPrefix:S,mergedFocusable:N,mergedSize:M,showBorder:g,enterPressed:f,rtlEnabled:s,handleMousedown:A,handleKeydown:y,handleBlur:Z,handleKeyup:U,handleClick:J,customColorCssVars:q(()=>{const{color:e}=r;if(!e)return null;const i=W(e);return{"--n-border-color":e,"--n-border-color-hover":i,"--n-border-color-pressed":X(e),"--n-border-color-focus":i,"--n-border-color-disabled":e}}),cssVars:c?void 0:z,themeClass:h==null?void 0:h.themeClass,onRender:h==null?void 0:h.onRender}},render(){const{mergedClsPrefix:r,tag:C,onRender:m}=this;m==null||m();const f=lo(this.$slots.default,g=>g&&D("span",{class:`${r}-button__content`},g));return D(C,{ref:"selfElRef",class:[this.themeClass,`${r}-button`,`${r}-button--${this.type}-type`,`${r}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${r}-button--rtl`,this.disabled&&`${r}-button--disabled`,this.block&&`${r}-button--block`,this.enterPressed&&`${r}-button--pressed`,!this.text&&this.dashed&&`${r}-button--dashed`,this.color&&`${r}-button--color`,this.secondary&&`${r}-button--secondary`,this.loading&&`${r}-button--loading`,this.ghost&&`${r}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&f,D(Qo,{width:!0},{default:()=>lo(this.$slots.icon,g=>(this.loading||this.renderIcon||g)&&D("span",{class:`${r}-button__icon`,style:{margin:Oo(this.$slots.default)?"0":""}},D(Fo,null,{default:()=>this.loading?D(Go,{clsPrefix:r,key:"loading",class:`${r}-icon-slot`,strokeWidth:20}):D("div",{key:"icon",class:`${r}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():g)})))}),this.iconPlacement==="left"&&f,this.text?null:D(qo,{ref:"waveElRef",clsPrefix:r}),this.showBorder?D("div",{"aria-hidden":!0,class:`${r}-button__border`,style:this.customColorCssVars}):null,this.showBorder?D("div",{"aria-hidden":!0,class:`${r}-button__state-border`,style:this.customColorCssVars}):null)}}),hr=bo,vr=bo;export{hr as N,vr as X,Yo as a,Zo as b};