ll-package
Version:
8 lines (7 loc) • 2.74 kB
JavaScript
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../@babel/runtime/helpers/esm/extends.js"),r=require("../../style/motion/move.js"),d=require("../../style/motion/slide.js"),n=require("../../style/index.js"),a=e=>{const{controlPaddingHorizontal:o}=e;return{position:"relative",display:"block",minHeight:e.controlHeight,padding:`${(e.controlHeight-e.fontSize*e.lineHeight)/2}px ${o}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,boxSizing:"border-box"}},p=e=>{const{antCls:o,componentCls:i}=e,l=`${i}-item`;return[{[`${i}-dropdown`]:t.default(t.default({},n.resetComponent(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
&${o}-slide-up-enter${o}-slide-up-enter-active${i}-dropdown-placement-bottomLeft,
&${o}-slide-up-appear${o}-slide-up-appear-active${i}-dropdown-placement-bottomLeft
`]:{animationName:d.slideUpIn},[`
&${o}-slide-up-enter${o}-slide-up-enter-active${i}-dropdown-placement-topLeft,
&${o}-slide-up-appear${o}-slide-up-appear-active${i}-dropdown-placement-topLeft
`]:{animationName:d.slideDownIn},[`&${o}-slide-up-leave${o}-slide-up-leave-active${i}-dropdown-placement-bottomLeft`]:{animationName:d.slideUpOut},[`&${o}-slide-up-leave${o}-slide-up-leave-active${i}-dropdown-placement-topLeft`]:{animationName:d.slideDownOut},"&-hidden":{display:"none"},"&-empty":{color:e.colorTextDisabled},[`${l}-empty`]:t.default(t.default({},a(e)),{color:e.colorTextDisabled}),[`${l}`]:t.default(t.default({},a(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":t.default({flex:"auto"},n.textEllipsis),"&-state":{flex:"none"},[`&-active:not(${l}-option-disabled)`]:{backgroundColor:e.controlItemBgHover},[`&-selected:not(${l}-option-disabled)`]:{color:e.colorText,fontWeight:e.fontWeightStrong,backgroundColor:e.controlItemBgActive,[`${l}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${l}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},d.initSlideMotion(e,"slide-up"),d.initSlideMotion(e,"slide-down"),r.initMoveMotion(e,"move-up"),r.initMoveMotion(e,"move-down")]};exports.default=p;
;