@gientech/modual 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- import*as s from"react";import{isValidElement as F}from"react";import{H as G,J,N as Q,a0 as U,P as X,aP as Y,a4 as Z,a3 as q,x as ee,b as x,aQ as te,aa as oe,k as ne,z as re,aR as ae,y as se,K as le}from"./index-C_syaGTO.js";import"react-dom";const h=e=>e?typeof e=="function"?e():e:null,ie=e=>{const{componentCls:o,popoverColor:n,titleMinWidth:t,fontWeightStrong:r,innerPadding:a,boxShadowSecondary:d,colorTextHeading:p,borderRadiusLG:m,zIndexPopup:g,titleMarginBottom:l,colorBgElevated:u,popoverBg:v,titleBorderBottom:f,innerContentPadding:b,titlePadding:i}=e;return[{[o]:Object.assign(Object.assign({},X(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:g,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":u,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${o}-content`]:{position:"relative"},[`${o}-inner`]:{backgroundColor:v,backgroundClip:"padding-box",borderRadius:m,boxShadow:d,padding:a},[`${o}-title`]:{minWidth:t,marginBottom:l,color:p,fontWeight:r,borderBottom:f,padding:i},[`${o}-inner-content`]:{color:n,padding:b}})},U(e,"var(--antd-arrow-background-color)"),{[`${o}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${o}-content`]:{display:"inline-block"}}}]},ce=e=>{const{componentCls:o}=e;return{[o]:Y.map(n=>{const t=e[`${n}6`];return{[`&${o}-${n}`]:{"--antd-arrow-background-color":t,[`${o}-inner`]:{backgroundColor:t},[`${o}-arrow`]:{background:"transparent"}}}})}},de=e=>{const{lineWidth:o,controlHeight:n,fontHeight:t,padding:r,wireframe:a,zIndexPopupBase:d,borderRadiusLG:p,marginXS:m,lineType:g,colorSplit:l,paddingSM:u}=e,v=n-t,f=v/2,b=v/2-o,i=r;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:d+30},Z(e)),q({contentRadius:p,limitVerticalRadius:!0})),{innerPadding:a?0:12,titleMarginBottom:a?0:m,titlePadding:a?`${f}px ${i}px ${b}px`:0,titleBorderBottom:a?`${o}px ${g} ${l}`:"none",innerContentPadding:a?`${u}px ${i}px`:0})},k=G("Popover",e=>{const{colorBgElevated:o,colorText:n}=e,t=J(e,{popoverBg:o,popoverColor:n});return[ie(t),ce(t),Q(t,"zoom-big")]},de,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var pe=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r<t.length;r++)o.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(n[t[r]]=e[t[r]]);return n};const _=({title:e,content:o,prefixCls:n})=>!e&&!o?null:s.createElement(s.Fragment,null,e&&s.createElement("div",{className:`${n}-title`},e),o&&s.createElement("div",{className:`${n}-inner-content`},o)),me=e=>{const{hashId:o,prefixCls:n,className:t,style:r,placement:a="top",title:d,content:p,children:m}=e,g=h(d),l=h(p),u=x(o,n,`${n}-pure`,`${n}-placement-${a}`,t);return s.createElement("div",{className:u,style:r},s.createElement("div",{className:`${n}-arrow`}),s.createElement(te,Object.assign({},e,{className:o,prefixCls:n}),m||s.createElement(_,{prefixCls:n,title:g,content:l})))},ge=e=>{const{prefixCls:o,className:n}=e,t=pe(e,["prefixCls","className"]),{getPrefixCls:r}=s.useContext(ee),a=r("popover",o),[d,p,m]=k(a);return d(s.createElement(me,Object.assign({},t,{prefixCls:a,hashId:p,className:x(n,m)})))};var ue=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r<t.length;r++)o.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(n[t[r]]=e[t[r]]);return n};const fe=s.forwardRef((e,o)=>{var n,t;const{prefixCls:r,title:a,content:d,overlayClassName:p,placement:m="top",trigger:g="hover",children:l,mouseEnterDelay:u=.1,mouseLeaveDelay:v=.1,onOpenChange:f,overlayStyle:b={},styles:i,classNames:y}=e,w=ue(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:N,className:I,style:T,classNames:S,styles:$}=oe("popover"),O=N("popover",r),[W,z,R]=k(O),D=N(),M=x(p,z,R,I,S.root,y==null?void 0:y.root),H=x(S.body,y==null?void 0:y.body),[V,A]=ne(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(t=e.defaultOpen)!==null&&t!==void 0?t:e.defaultVisible}),j=(c,C)=>{A(c,!0),f==null||f(c,C)},K=c=>{c.keyCode===le.ESC&&j(!1,c)},L=c=>{j(c)},B=h(a),E=h(d);return W(s.createElement(re,Object.assign({placement:m,trigger:g,mouseEnterDelay:u,mouseLeaveDelay:v},w,{prefixCls:O,classNames:{root:M,body:H},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},$.root),T),b),i==null?void 0:i.root),body:Object.assign(Object.assign({},$.body),i==null?void 0:i.body)},ref:o,open:V,onOpenChange:L,overlay:B||E?s.createElement(_,{prefixCls:O,title:B,content:E}):null,transitionName:ae(D,"zoom-big",w.transitionName),"data-popover-inject":!0}),se(l,{onKeyDown:c=>{var C,P;F(l)&&((P=l==null?void 0:(C=l.props).onKeyDown)===null||P===void 0||P.call(C,c)),K(c)}})))}),ve=fe;ve._InternalPanelDoNotUseOrYouWillBeFired=ge;export{ge as P,ve as a,h as g};