ll-package
Version:
2 lines (1 loc) • 2.23 kB
JavaScript
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("../../../../@babel/runtime/helpers/esm/extends.js"),$=require("../../style/motion/zoom.js");require("../../theme/internal.js");const x=require("../../style/index.js"),v=require("../../style/placementArrow.js"),b=require("../../theme/util/genComponentStyleHook.js"),h=require("../../theme/util/statistic.js"),S=require("../../theme/interface/presetColors.js"),C=e=>{const{componentCls:o,popoverBg:t,popoverColor:n,width:r,fontWeightStrong:d,popoverPadding:l,boxShadowSecondary:a,colorTextHeading:p,borderRadiusLG:c,zIndexPopup:i,marginXS:s,colorBgElevated:u}=e;return[{[o]:m.default(m.default({},x.resetComponent(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:i,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--antd-arrow-background-color":u,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${o}-content`]:{position:"relative"},[`${o}-inner`]:{backgroundColor:t,backgroundClip:"padding-box",borderRadius:c,boxShadow:a,padding:l},[`${o}-title`]:{minWidth:r,marginBottom:s,color:p,fontWeight:d},[`${o}-inner-content`]:{color:n}})},v.default(e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${o}-pure`]:{position:"relative",maxWidth:"none",[`${o}-content`]:{display:"inline-block"}}}]},f=e=>{const{componentCls:o}=e;return{[o]:S.PresetColors.map(t=>{const n=e[`${t}-6`];return{[`&${o}-${t}`]:{"--antd-arrow-background-color":n,[`${o}-inner`]:{backgroundColor:n},[`${o}-arrow`]:{background:"transparent"}}}})}},B=e=>{const{componentCls:o,lineWidth:t,lineType:n,colorSplit:r,paddingSM:d,controlHeight:l,fontSize:a,lineHeight:p,padding:c}=e,i=l-Math.round(a*p),s=i/2,u=i/2-t,g=c;return{[o]:{[`${o}-inner`]:{padding:0},[`${o}-title`]:{margin:0,padding:`${s}px ${g}px ${u}px`,borderBottom:`${t}px ${n} ${r}`},[`${o}-inner-content`]:{padding:`${d}px ${g}px`}}}},P=b.default("Popover",e=>{const{colorBgElevated:o,colorText:t,wireframe:n}=e,r=h.merge(e,{popoverBg:o,popoverColor:t,popoverPadding:12});return[C(r),f(r),n&&B(r),$.initZoomMotion(r,"zoom-big")]},e=>{let{zIndexPopupBase:o}=e;return{zIndexPopup:o+30,width:177}});exports.default=P;
;