ll-package
Version:
2 lines (1 loc) • 3.34 kB
JavaScript
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../@babel/runtime/helpers/esm/extends.js"),i=require("../../input/style/index.js");require("../../theme/internal.js");const a=require("../../style/index.js"),m=require("../../theme/util/genComponentStyleHook.js"),w=e=>{const{componentCls:o,colorTextDisabled:l,controlItemBgHover:r,controlPaddingHorizontal:c,colorText:d,motionDurationSlow:p,lineHeight:s,controlHeight:g,inputPaddingHorizontal:u,inputPaddingVertical:h,fontSize:b,colorBgElevated:f,borderRadiusLG:n,boxShadowSecondary:S}=e,x=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return{[o]:t.default(t.default(t.default(t.default(t.default({},a.resetComponent(e)),i.genBasicInputStyle(e)),{position:"relative",display:"inline-block",height:"auto",padding:0,overflow:"hidden",lineHeight:s,whiteSpace:"pre-wrap",verticalAlign:"bottom"}),i.genStatusStyle(e,o)),{"&-disabled":{"> textarea":t.default({},i.genDisabledStyle(e))},"&-focused":t.default({},i.genActiveStyle(e)),[`&-affix-wrapper ${o}-suffix`]:{position:"absolute",top:0,insetInlineEnd:u,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"},[`> textarea, ${o}-measure`]:{color:d,boxSizing:"border-box",minHeight:g-2,margin:0,padding:`${h}px ${u}px`,overflow:"inherit",overflowX:"hidden",overflowY:"auto",fontWeight:"inherit",fontSize:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontVariant:"inherit",fontSizeAdjust:"inherit",fontStretch:"inherit",lineHeight:"inherit",direction:"inherit",letterSpacing:"inherit",whiteSpace:"inherit",textAlign:"inherit",verticalAlign:"top",wordWrap:"break-word",wordBreak:"inherit",tabSize:"inherit"},"> textarea":t.default({width:"100%",border:"none",outline:"none",resize:"none",backgroundColor:"inherit"},i.genPlaceholderStyle(e.colorTextPlaceholder)),[`${o}-measure`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:-1,color:"transparent",pointerEvents:"none","> span":{display:"inline-block",minHeight:"1em"}},"&-dropdown":t.default(t.default({},a.resetComponent(e)),{position:"absolute",top:-9999,insetInlineStart:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",fontSize:b,fontVariant:"initial",backgroundColor:f,borderRadius:n,outline:"none",boxShadow:S,"&-hidden":{display:"none"},[`${o}-dropdown-menu`]:{maxHeight:e.dropdownHeight,marginBottom:0,paddingInlineStart:0,overflow:"auto",listStyle:"none",outline:"none","&-item":t.default(t.default({},a.textEllipsis),{position:"relative",display:"block",minWidth:e.controlItemWidth,padding:`${x}px ${c}px`,color:d,fontWeight:"normal",lineHeight:s,cursor:"pointer",transition:`background ${p} ease`,"&:hover":{backgroundColor:r},"&:first-child":{borderStartStartRadius:n,borderStartEndRadius:n,borderEndStartRadius:0,borderEndEndRadius:0},"&:last-child":{borderStartStartRadius:0,borderStartEndRadius:0,borderEndStartRadius:n,borderEndEndRadius:n},"&-disabled":{color:l,cursor:"not-allowed","&:hover":{color:l,backgroundColor:r,cursor:"not-allowed"}},"&-selected":{color:d,fontWeight:e.fontWeightStrong,backgroundColor:r},"&-active":{backgroundColor:r}})}})})}},v=m.default("Mentions",e=>{const o=i.initInputToken(e);return[w(o)]},e=>({dropdownHeight:250,controlItemWidth:100,zIndexPopup:e.zIndexPopupBase+50}));exports.default=v;
;