2025-08-23 19:43:48 +03:30
|
|
|
import{aT as I,aX as W,aY as ge,aV as Ee,ec as Re,aJ as C,bx as Ne,b5 as Le,b6 as ke,c6 as je,bd as Me,dk as te,d as F,aL as fe,aM as be,k as A,C as d,ay as Q,aR as oe,aQ as J,cV as ne,bw as ae,bu as Ue,b8 as se,aA as H,N as ye,G as he,r as k,aI as le,a1 as Ve,o as Fe,af as ie,F as Z,z as U,D as S,A as b,H as c,T as E,E as $e,B as P,Q as He,ce as j,g as Xe,y as Ye,S as re,c$ as Ge}from"./UdOyBpMP.js";import{a as M}from"./vGRX5v9z.js";import{B as We}from"./w0GIr-t-.js";import{_ as qe}from"./DGVfD--1.js";import{B as Qe}from"./rfNZXhah.js";import{B as de}from"./GnIoT5nL.js";import{B as Je}from"./MR5gpPl5.js";import{B as ce}from"./DHqjU6kU.js";import{F as Ze}from"./Dn5TqT2b.js";import{_ as Ke}from"./q8HcKXG5.js";import{B as R}from"./j0GddizS.js";import{E as et,u as tt,M as ot,_ as nt}from"./BaMyv3ih.js";import{D as at}from"./CTuUaBfs.js";import{c as st,r as lt,d as it}from"./auK7iHvF.js";import{i as ue}from"./BKd9CuCq.js";import{i as pe,a as rt,s as dt,c as ct,b as ut}from"./BN8ASFqu.js";import{R as me}from"./N8eSj13c.js";const we=()=>({arrow:Ee([Boolean,Object]),trigger:{type:[Array,String]},menu:W(),overlay:ge.any,visible:I(),open:I(),disabled:I(),danger:I(),autofocus:I(),align:W(),getPopupContainer:Function,prefixCls:String,transitionName:String,placement:String,overlayClassName:String,overlayStyle:W(),forceRender:I(),mouseEnterDelay:Number,mouseLeaveDelay:Number,openClassName:String,minOverlayWidthMatchTrigger:I(),destroyPopupOnHide:I(),onVisibleChange:{type:Function},"onUpdate:visible":{type:Function},onOpenChange:{type:Function},"onUpdate:open":{type:Function}}),q=Re(),pt=()=>C(C({},we()),{type:q.type,size:String,htmlType:q.htmlType,href:String,disabled:I(),prefixCls:String,icon:ge.any,title:String,loading:q.loading,onClick:Ne()}),mt=e=>{const{componentCls:t,antCls:o,paddingXS:i,opacityLoading:l}=e;return{[`${t}-button`]:{whiteSpace:"nowrap",[`&${o}-btn-group > ${o}-btn`]:{[`&-loading, &-loading + ${o}-btn`]:{cursor:"default",pointerEvents:"none",opacity:l},[`&:last-child:not(:first-child):not(${o}-btn-icon-only)`]:{paddingInline:i}}}}},vt=e=>{const{componentCls:t,menuCls:o,colorError:i,colorTextLightSolid:l}=e,a=`${o}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${o} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:i,"&:hover":{color:l,backgroundColor:i}}}}}},gt=e=>{const{componentCls:t,menuCls:o,zIndexPopup:i,dropdownArrowDistance:l,dropdownArrowOffset:a,sizePopupArrow:g,antCls:n,iconCls:p,motionDurationMid:_,dropdownPaddingVertical:h,fontSize:$,dropdownEdgeChildPadding:m,colorTextDisabled:y,fontSizeIcon:v,controlPaddingHorizontal:f,colorBgElevated:s,boxShadowPopoverArrow:u}=e;return[{[t]:C(C({},Me(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:i,display:"block","&::before":{position:"absolute",insetBlock:-l+g/2,zIndex:-9999,opacity:1e-4,content:'""'},[`${t}-wrap`]:{position:"relative",[`${n}-btn > ${p}-down`]:{fontSize:v},[`${p}-down::before`]:{transition:`transform ${_}`}},[`${t}-wrap-open`]:{[`${p}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`
|
2025-08-19 21:38:30 +03:30
|
|
|
&-show-arrow${t}-placement-topLeft,
|
|
|
|
|
&-show-arrow${t}-placement-top,
|
|
|
|
|
&-show-arrow${t}-placement-topRight
|
|
|
|
|
`]:{paddingBottom:l},[`
|
|
|
|
|
&-show-arrow${t}-placement-bottomLeft,
|
|
|
|
|
&-show-arrow${t}-placement-bottom,
|
|
|
|
|
&-show-arrow${t}-placement-bottomRight
|
|
|
|
|
`]:{paddingTop:l},[`${t}-arrow`]:C({position:"absolute",zIndex:1,display:"block"},lt(g,e.borderRadiusXS,e.borderRadiusOuter,s,u)),[`
|
|
|
|
|
&-placement-top > ${t}-arrow,
|
|
|
|
|
&-placement-topLeft > ${t}-arrow,
|
|
|
|
|
&-placement-topRight > ${t}-arrow
|
|
|
|
|
`]:{bottom:l,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${t}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft > ${t}-arrow`]:{left:{_skip_check_:!0,value:a}},[`&-placement-topRight > ${t}-arrow`]:{right:{_skip_check_:!0,value:a}},[`
|
|
|
|
|
&-placement-bottom > ${t}-arrow,
|
|
|
|
|
&-placement-bottomLeft > ${t}-arrow,
|
|
|
|
|
&-placement-bottomRight > ${t}-arrow
|
|
|
|
|
`]:{top:l,transform:"translateY(-100%)"},[`&-placement-bottom > ${t}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateY(-100%) translateX(-50%)"},[`&-placement-bottomLeft > ${t}-arrow`]:{left:{_skip_check_:!0,value:a}},[`&-placement-bottomRight > ${t}-arrow`]:{right:{_skip_check_:!0,value:a}},[`&${n}-slide-down-enter${n}-slide-down-enter-active${t}-placement-bottomLeft,
|
|
|
|
|
&${n}-slide-down-appear${n}-slide-down-appear-active${t}-placement-bottomLeft,
|
|
|
|
|
&${n}-slide-down-enter${n}-slide-down-enter-active${t}-placement-bottom,
|
|
|
|
|
&${n}-slide-down-appear${n}-slide-down-appear-active${t}-placement-bottom,
|
|
|
|
|
&${n}-slide-down-enter${n}-slide-down-enter-active${t}-placement-bottomRight,
|
|
|
|
|
&${n}-slide-down-appear${n}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:ut},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-placement-topLeft,
|
|
|
|
|
&${n}-slide-up-appear${n}-slide-up-appear-active${t}-placement-topLeft,
|
|
|
|
|
&${n}-slide-up-enter${n}-slide-up-enter-active${t}-placement-top,
|
|
|
|
|
&${n}-slide-up-appear${n}-slide-up-appear-active${t}-placement-top,
|
|
|
|
|
&${n}-slide-up-enter${n}-slide-up-enter-active${t}-placement-topRight,
|
|
|
|
|
&${n}-slide-up-appear${n}-slide-up-appear-active${t}-placement-topRight`]:{animationName:ct},[`&${n}-slide-down-leave${n}-slide-down-leave-active${t}-placement-bottomLeft,
|
|
|
|
|
&${n}-slide-down-leave${n}-slide-down-leave-active${t}-placement-bottom,
|
|
|
|
|
&${n}-slide-down-leave${n}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:dt},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-placement-topLeft,
|
|
|
|
|
&${n}-slide-up-leave${n}-slide-up-leave-active${t}-placement-top,
|
|
|
|
|
&${n}-slide-up-leave${n}-slide-up-leave-active${t}-placement-topRight`]:{animationName:rt}})},{[`${t} ${o}`]:{position:"relative",margin:0},[`${o}-submenu-popup`]:{position:"absolute",zIndex:i,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul,li":{listStyle:"none"},ul:{marginInline:"0.3em"}},[`${t}, ${t}-menu-submenu`]:{[o]:C(C({padding:m,listStyleType:"none",backgroundColor:s,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},te(e)),{[`${o}-item-group-title`]:{padding:`${h}px ${f}px`,color:e.colorTextDescription,transition:`all ${_}`},[`${o}-item`]:{position:"relative",display:"flex",alignItems:"center",borderRadius:e.borderRadiusSM},[`${o}-item-icon`]:{minWidth:$,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${o}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${_}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${o}-item, ${o}-submenu-title`]:C(C({clear:"both",margin:0,padding:`${h}px ${f}px`,color:e.colorText,fontWeight:"normal",fontSize:$,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${_}`,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},te(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:y,cursor:"not-allowed","&:hover":{color:y,backgroundColor:s,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${e.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorTextDescription,fontSize:v,fontStyle:"normal"}}}),[`${o}-item-group-list`]:{margin:`0 ${e.marginXS}px`,padding:0,listStyle:"none"},[`${o}-submenu-title`]:{paddingInlineEnd:f+e.fontSizeSM},[`${o}-submenu-vertical`]:{position:"relative"},[`${o}-submenu${o}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:y,backgroundColor:s,cursor:"not-allowed"}},[`${o}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})}},[pe(e,"slide-up"),pe(e,"slide-down"),ue(e,"move-up"),ue(e,"move-down"),je(e,"zoom-big")]]},_e=Le("Dropdown",(e,t)=>{let{rootPrefixCls:o}=t;const{marginXXS:i,sizePopupArrow:l,controlHeight:a,fontSize:g,lineHeight:n,paddingXXS:p,componentCls:_,borderRadiusOuter:h,borderRadiusLG:$}=e,m=(a-g*n)/2,{dropdownArrowOffset:y}=st({sizePopupArrow:l,contentRadius:$,borderRadiusOuter:h}),v=ke(e,{menuCls:`${_}-menu`,rootPrefixCls:o,dropdownArrowDistance:l/2+i,dropdownArrowOffset:y,dropdownPaddingVertical:m,dropdownEdgeChildPadding:p});return[gt(v),mt(v),vt(v)]},e=>({zIndexPopup:e.zIndexPopupBase+50}));var ft=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)t.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(o[i[l]]=e[i[l]]);return o};const bt=Q.Group,V=F({compatConfig:{MODE:3},name:"ADropdownButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:fe(pt(),{trigger:"hover",placement:"bottomRight",type:"default"}),slots:Object,setup(e,t){let{slots:o,attrs:i,emit:l}=t;const a=m=>{l("update:visible",m),l("visibleChange",m),l("update:open",m),l("openChange",m)},{prefixCls:g,direction:n,getPopupContainer:p}=be("dropdown",e),_=A(()=>`${g.value}-button`),[h,$]=_e(g);return()=>{var m,y;const v=C(C({},e),i),{type:f="default",disabled:s,danger:u,loading:T,htmlType:x,class:r="",overlay:O=(m=o.overlay)===null||m===void 0?void 0:m.call(o),trigger:D,align:w,open:z,visible:L,onVisibleChange:X,placement:Y=n.value==="rtl"?"bottomLeft":"bottomRight",href:G,title:Se,icon:Ce=((y=o.icon)===null||y===void 0?void 0:y.call(o))||d(et,null,null),mouseEnterDelay:Oe,mouseLeaveDelay:Ae,overlayClassName:Te,overlayStyle:Be,destroyPopupOnHide:Pe,onClick:De,"onUpdate:open":Yt}=v,Ie=ft(v,[
|