物管理前端
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.
 
 
 
 

103 lines
22 KiB

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