@progress/kendo-react-tooltip 7.0.3-develop.9 → 7.1.0-develop.10
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.
- package/dist/cdn/js/kendo-react-tooltip.js +1 -1
- package/index.mjs +1 -1
- package/package.json +3 -3
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
(function(l,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup"],m):(l=typeof globalThis<"u"?globalThis:l||self,m(l.KendoReactTooltip={},l.React,l.ReactDOM,l.PropTypes,l.KendoReactCommon,l.KendoReactPopup))})(this,function(l,m,T,n,c,L){"use strict";"use client";function I(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const s=I(m),S=I(T),u=10,h=10,U=(e,t,o,i,r)=>{switch(r){case"bottom":return i==="pointer"?e-t/2:o.left-t/2+o.width/2;case"left":return i==="pointer"?e-t-u:o.left-t-u;case"right":return i==="pointer"?e+u:o.right+u;case"top":return i==="pointer"?e-t/2:o.left-t/2+o.width/2;default:return i==="pointer"?e<window.screen.availWidth/2?e-u:e-t+u:e<window.screen.availWidth/2?o.left:o.right-t}},_=(e,t,o,i,r)=>{switch(r){case"bottom":return i==="pointer"?e+h:t.bottom+h;case"left":return i==="pointer"?e-o/2:t.top-o/2+t.height/2;case"right":return i==="pointer"?e-o/2:t.top-o/2+t.height/2;case"top":return i==="pointer"?e-o-h:t.top-o-h;default:return i==="pointer"?e<window.innerHeight/2?e+u:e-o-u:e<window.innerHeight/2?t.bottom+h:t.top-o-h}},j=e=>e!==null?e.getBoundingClientRect():document.body.getBoundingClientRect(),B=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],N=e=>{if(e===null)return!1;let t=e;for(;t;){if(t!==null&&t.classList&&t.classList.contains("k-tooltip"))return!0;t.parentNode!==null?t=t.parentNode:t=!1}return B.filter(o=>o===e.className).length>0},C={name:"@progress/kendo-react-tooltip",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},Z=100,x=class extends s.PureComponent{constructor(e){super(e),this.context=0,this.state={targetElement:null,open:!1,title:""},this.top=0,this.left=0,this.willOpen=!1,this.handleMouseOut=t=>{const{targetElement:o}=this.state,i=o?o.ownerDocument:document;let r=i&&i.elementFromPoint(t.clientX,t.clientY);N(r)||this.props.open||(clearInterval(this.updateIntervalId),this.willOpen=!1,this.onClose(t))},this.handleMouseOver=t=>{const o=t.target;!this.isVisible(o)||N(o)||o===this.state.targetElement||this.showToolTip(t)},this.handleBodyMousemove=t=>{this.top=t.clientY,this.left=t.clientX},this.onClose=t=>{c.dispatchEvent(this.props.onClose,t,this,void 0),this.setState({targetElement:null,open:!1,title:""})},this.setUpdateInterval=()=>{this.props.updateInterval&&(this.updateIntervalId=setInterval(this.onIntervalUpdate,this.props.updateInterval))},this.onIntervalUpdate=()=>{const t=this.state.targetElement;t&&(t.parentElement===null?this.onClose({target:t}):this.showToolTip({target:t}))},this.position=t=>{let o=j(this.state.targetElement);const i=U(this.left,t.offsetWidth,o,this.props.anchorElement,this.props.position),r=_(this.top,o,t.offsetHeight,this.props.anchorElement,this.props.position);return{left:i,top:r}},this.getTitle=t=>{for(;t;){if(t.getAttribute("title")!==null||t.titleExpando)return{title:t.getAttribute("title")||t.titleExpando,element:t};t=this.props.parentTitle&&t.parentElement||null}return{title:"",element:t}},this.calloutClassName=()=>{switch(this.props.position){case"bottom":return"k-callout k-callout-n";case"left":return"k-callout k-callout-e";case"right":return"k-callout k-callout-w";case"top":return"k-callout k-callout-s";default:return this.top<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},this.getCurrentZIndex=()=>this.context?this.context:Z,c.validatePackage(C)}componentDidMount(){document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)}componentWillUnmount(){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove)}componentDidUpdate(){this.props.open&&this.props.targetElement&&this.showToolTip({target:this.props.targetElement})}render(){if(this.props.children){const{children:o,...i}=this.props;let r=null;return s.createElement("div",{onMouseOver:p=>{r&&r.handleMouseOver(p)},onMouseOut:p=>{r&&r.handleMouseOut(p)}},s.createElement(x,{ref:p=>r=p,...i}),o)}if(this.props.open===!1)return null;const{targetElement:e}=this.state,t=this.getCurrentZIndex();return e&&this.state.title&&e.ownerDocument&&S.createPortal(s.createElement("div",{ref:o=>{if(!o)return;let i;if(this.props.onPosition){const r={element:o,targetElement:this.state.targetElement,mouseTop:this.top,mouseLeft:this.left,anchorElement:this.props.anchorElement,position:this.props.position,target:this,syntheticEvent:null,nativeEvent:null};i=this.props.onPosition.call(void 0,r)}else i=this.position(o);o.style.left=i.left+"px",o.style.top=i.top+"px"},className:c.classNames("k-animation-container","k-animation-container-fixed","k-animation-container-shown",this.props.className),style:{zIndex:t,...this.props.style},tabIndex:0},s.createElement("div",{className:"k-child-animation-container"},s.createElement("div",{id:this.props.id,role:"tooltip",className:c.classNames("k-tooltip",this.props.tooltipClassName),style:{position:"relative",...this.props.tooltipStyle}},s.createElement("div",{className:"k-tooltip-content"},this.props.content&&s.createElement(this.props.content,{title:this.state.title,target:this.state.targetElement})||this.state.title),this.props.showCallout&&s.createElement("div",{ref:o=>{o&&(o.className=this.calloutClassName(),this.props.position==="auto"&&(this.left<window.screen.availWidth/2?o.style.left=this.props.setCalloutOnPositionAuto||"25%":o.style.left=this.props.setCalloutOnPositionAuto||"75%"))}})))),this.props.appendTo?this.props.appendTo:e.ownerDocument.body)}showToolTip(e){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),e.target.hasChildNodes()&&e.target.childNodes.forEach(i=>{i.nodeName==="title"&&(e.target.titleExpando=i.innerHTML,i.remove())});const t=this.props.targetElement||e.target;let o=this.getTitle(t);if(!o.title){this.state.open&&this.onClose(e);return}o.element&&(o.element.titleExpando=o.title,o.element.title=""),this.willOpen=!0,this.props.openDelay?this.openTimeoutId=window.setTimeout(()=>{this.willOpen&&this.setState({targetElement:t,open:!0,title:o.title},this.setUpdateInterval)},this.props.openDelay):this.setState({targetElement:t,open:!0,title:o.title},this.setUpdateInterval),this.state.title!==o.title&&c.dispatchEvent(this.props.onOpen,e,this,void 0)}isVisible(e){return!this.props.filter||this.props.filter(e)}};let g=x;g.propTypes={anchorElement:n.oneOf(["pointer","target"]),content:n.func,filter:n.func,openDelay:n.number,position:n.oneOf(["right","left","top","bottom","auto"]),updateInterval:n.number},g.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1},g.contextType=c.ZIndexContext;const f=s.forwardRef((e,t)=>{const o=s.useRef(null),i=s.useRef(null);return s.useImperativeHandle(i,()=>({props:e,element:o.current})),s.useImperativeHandle(t,()=>i.current),s.createElement("div",{ref:o,className:c.classNames("k-popover-actions","k-actions",{[`k-actions-${e.alignment}`]:e.alignment,[`k-actions-${e.orientation}`]:e.orientation})},e.children)}),K={alignment:"stretched",orientation:"horizontal"};f.propTypes={alignment:n.oneOf(["start","center","end","stretched"]),orientation:n.oneOf(["horizontal","vertical"]),children:n.oneOfType([n.element,n.node])},f.defaultProps=K,f.displayName="KendoReactPopoverActionsBar";const F=12e3,V=2e3,D=15,q={top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"},P={top:"k-callout-n",left:"k-callout-w",bottom:"k-callout-s",right:"k-callout-e"},X={top:{vertical:"bottom",horizontal:"center"},left:{vertical:"center",horizontal:"right"},bottom:{vertical:"top",horizontal:"center"},right:{vertical:"center",horizontal:"left"}},H={top:{vertical:"top",horizontal:"center"},left:{vertical:"center",horizontal:"left"},bottom:{vertical:"bottom",horizontal:"center"},right:{vertical:"center",horizontal:"right"}},$=e=>s.Children.toArray(e).filter(t=>t&&t.type===f),Y=e=>s.Children.toArray(e).filter(t=>t&&t.type!==f),b=s.forwardRef((e,t)=>{c.validatePackage(C);const{callout:o,position:i,title:r,children:p,show:J,anchor:Q,appendTo:W,offset:tt,animate:et,positionMode:ot,scale:nt,popoverClass:d,className:it,id:st,style:rt,collision:lt,contentStyle:y,onPosition:O,onClose:k,onOpen:E}=e,[at,A]=s.useState(!1),M=i==="top"||i==="bottom",ct=e.margin||{vertical:o&&M?D:0,horizontal:o&&!M?D:0},pt=X[i],ut=H[i],R=s.useContext(c.ZIndexContext),dt=R?R+V:F,v=s.useRef(null);s.useImperativeHandle(v,()=>({props:e})),s.useImperativeHandle(t,()=>v.current);const ht=s.useCallback(a=>{if(setTimeout(()=>A(a.flipped)),O){const gt={target:v.current,flipped:a.flipped,fitted:a.fitted};O.call(void 0,gt)}},[O,A]),ft=s.useCallback(()=>{if(E){const a={target:v.current};E.call(void 0,a)}},[E]),mt=s.useCallback(()=>{if(k){const a={target:v.current};k.call(void 0,a)}},[k]),w={"k-popover":!0};Array.isArray(d)?d.forEach(a=>w[a]=!0):typeof d=="object"?Object.keys(d).forEach(a=>{w[a]=d[a]}):d&&(w[d]=!0);const vt=at?P[i]:q[i],z=s.useMemo(()=>s.createElement(s.Fragment,null,r&&s.createElement("div",{className:"k-popover-header"},r),s.createElement("div",{className:"k-popover-body",style:y},Y(p)),$(p)),[p,y,r]);return s.createElement(c.ZIndexContext.Provider,{value:dt},s.createElement(L.Popup,{id:st,role:"tooltip",animate:et,collision:lt,anchor:Q,offset:tt,margin:ct,popupAlign:pt,anchorAlign:ut,appendTo:W,show:J,scale:nt,positionMode:ot,style:rt,className:it,popupClass:w,onOpen:ft,onClose:mt,onPosition:ht},o&&i?s.createElement(s.Fragment,null,s.createElement("div",{className:c.classNames("k-popover-callout",vt)}),s.createElement("div",{className:"k-popover-inner"},z)):z))}),G={callout:!0,position:"top",collision:{horizontal:"none",vertical:"none"}};b.propTypes={callout:n.bool,title:n.node,position:n.oneOf(["top","left","bottom","right"]),show:n.bool,animate:n.oneOfType([n.bool,n.shape({openDuration:n.number,closeDuration:n.number})]),anchor:function(e){const t=e.anchor;return t&&typeof t.nodeType!="number"?new Error("Invalid prop `anchor` supplied to `Kendo React Popover`. Validation failed."):null},appendTo:function(e){const t=e.appendTo;return t&&typeof t.nodeType!="number"?new Error("Invalid prop `appendTo` supplied to `Kendo React Popover`. Validation failed."):null},positionMode:n.oneOf(["fixed","absolute"]),scale:n.number,offset:n.shape({left:n.number,top:n.number}),children:n.oneOfType([n.element,n.node]),className:n.oneOfType([n.string,n.arrayOf(n.string),n.object]),id:n.string,popoverClass:n.oneOfType([n.string,n.arrayOf(n.string),n.object]),style:n.object,onClose:n.func,onPosition:n.func,onOpen:n.func},b.defaultProps=G,b.displayName="KendoReactPopover",l.Popover=b,l.PopoverActionsBar=f,l.Tooltip=g,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
|
|
5
|
+
(function(l,m){typeof exports=="object"&&typeof module!="undefined"?m(exports,require("react"),require("react-dom"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup"],m):(l=typeof globalThis!="undefined"?globalThis:l||self,m(l.KendoReactTooltip={},l.React,l.ReactDOM,l.PropTypes,l.KendoReactCommon,l.KendoReactPopup))})(this,function(l,m,T,n,c,L){"use strict";"use client";function I(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const s=I(m),S=I(T),u=10,h=10,U=(e,t,o,i,r)=>{switch(r){case"bottom":return i==="pointer"?e-t/2:o.left-t/2+o.width/2;case"left":return i==="pointer"?e-t-u:o.left-t-u;case"right":return i==="pointer"?e+u:o.right+u;case"top":return i==="pointer"?e-t/2:o.left-t/2+o.width/2;default:return i==="pointer"?e<window.screen.availWidth/2?e-u:e-t+u:e<window.screen.availWidth/2?o.left:o.right-t}},_=(e,t,o,i,r)=>{switch(r){case"bottom":return i==="pointer"?e+h:t.bottom+h;case"left":return i==="pointer"?e-o/2:t.top-o/2+t.height/2;case"right":return i==="pointer"?e-o/2:t.top-o/2+t.height/2;case"top":return i==="pointer"?e-o-h:t.top-o-h;default:return i==="pointer"?e<window.innerHeight/2?e+u:e-o-u:e<window.innerHeight/2?t.bottom+h:t.top-o-h}},j=e=>e!==null?e.getBoundingClientRect():document.body.getBoundingClientRect(),B=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],N=e=>{if(e===null)return!1;let t=e;for(;t;){if(t!==null&&t.classList&&t.classList.contains("k-tooltip"))return!0;t.parentNode!==null?t=t.parentNode:t=!1}return B.filter(o=>o===e.className).length>0},C={name:"@progress/kendo-react-tooltip",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},Z=100,x=class extends s.PureComponent{constructor(e){super(e),this.context=0,this.state={targetElement:null,open:!1,title:""},this.top=0,this.left=0,this.willOpen=!1,this.handleMouseOut=t=>{const{targetElement:o}=this.state,i=o?o.ownerDocument:document;let r=i&&i.elementFromPoint(t.clientX,t.clientY);N(r)||this.props.open||(clearInterval(this.updateIntervalId),this.willOpen=!1,this.onClose(t))},this.handleMouseOver=t=>{const o=t.target;!this.isVisible(o)||N(o)||o===this.state.targetElement||this.showToolTip(t)},this.handleBodyMousemove=t=>{this.top=t.clientY,this.left=t.clientX},this.onClose=t=>{c.dispatchEvent(this.props.onClose,t,this,void 0),this.setState({targetElement:null,open:!1,title:""})},this.setUpdateInterval=()=>{this.props.updateInterval&&(this.updateIntervalId=setInterval(this.onIntervalUpdate,this.props.updateInterval))},this.onIntervalUpdate=()=>{const t=this.state.targetElement;t&&(t.parentElement===null?this.onClose({target:t}):this.showToolTip({target:t}))},this.position=t=>{let o=j(this.state.targetElement);const i=U(this.left,t.offsetWidth,o,this.props.anchorElement,this.props.position),r=_(this.top,o,t.offsetHeight,this.props.anchorElement,this.props.position);return{left:i,top:r}},this.getTitle=t=>{for(;t;){if(t.getAttribute("title")!==null||t.titleExpando)return{title:t.getAttribute("title")||t.titleExpando,element:t};t=this.props.parentTitle&&t.parentElement||null}return{title:"",element:t}},this.calloutClassName=()=>{switch(this.props.position){case"bottom":return"k-callout k-callout-n";case"left":return"k-callout k-callout-e";case"right":return"k-callout k-callout-w";case"top":return"k-callout k-callout-s";default:return this.top<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},this.getCurrentZIndex=()=>this.context?this.context:Z,c.validatePackage(C)}componentDidMount(){document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)}componentWillUnmount(){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove)}componentDidUpdate(){this.props.open&&this.props.targetElement&&this.showToolTip({target:this.props.targetElement})}render(){if(this.props.children){const{children:o,...i}=this.props;let r=null;return s.createElement("div",{onMouseOver:p=>{r&&r.handleMouseOver(p)},onMouseOut:p=>{r&&r.handleMouseOut(p)}},s.createElement(x,{ref:p=>r=p,...i}),o)}if(this.props.open===!1)return null;const{targetElement:e}=this.state,t=this.getCurrentZIndex();return e&&this.state.title&&e.ownerDocument&&S.createPortal(s.createElement("div",{ref:o=>{if(!o)return;let i;if(this.props.onPosition){const r={element:o,targetElement:this.state.targetElement,mouseTop:this.top,mouseLeft:this.left,anchorElement:this.props.anchorElement,position:this.props.position,target:this,syntheticEvent:null,nativeEvent:null};i=this.props.onPosition.call(void 0,r)}else i=this.position(o);o.style.left=i.left+"px",o.style.top=i.top+"px"},className:c.classNames("k-animation-container","k-animation-container-fixed","k-animation-container-shown",this.props.className),style:{zIndex:t,...this.props.style},tabIndex:0},s.createElement("div",{className:"k-child-animation-container"},s.createElement("div",{id:this.props.id,role:"tooltip",className:c.classNames("k-tooltip",this.props.tooltipClassName),style:{position:"relative",...this.props.tooltipStyle}},s.createElement("div",{className:"k-tooltip-content"},this.props.content&&s.createElement(this.props.content,{title:this.state.title,target:this.state.targetElement})||this.state.title),this.props.showCallout&&s.createElement("div",{ref:o=>{o&&(o.className=this.calloutClassName(),this.props.position==="auto"&&(this.left<window.screen.availWidth/2?o.style.left=this.props.setCalloutOnPositionAuto||"25%":o.style.left=this.props.setCalloutOnPositionAuto||"75%"))}})))),this.props.appendTo?this.props.appendTo:e.ownerDocument.body)}showToolTip(e){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),e.target.hasChildNodes()&&e.target.childNodes.forEach(i=>{i.nodeName==="title"&&(e.target.titleExpando=i.innerHTML,i.remove())});const t=this.props.targetElement||e.target;let o=this.getTitle(t);if(!o.title){this.state.open&&this.onClose(e);return}o.element&&(o.element.titleExpando=o.title,o.element.title=""),this.willOpen=!0,this.props.openDelay?this.openTimeoutId=window.setTimeout(()=>{this.willOpen&&this.setState({targetElement:t,open:!0,title:o.title},this.setUpdateInterval)},this.props.openDelay):this.setState({targetElement:t,open:!0,title:o.title},this.setUpdateInterval),this.state.title!==o.title&&c.dispatchEvent(this.props.onOpen,e,this,void 0)}isVisible(e){return!this.props.filter||this.props.filter(e)}};let g=x;g.propTypes={anchorElement:n.oneOf(["pointer","target"]),content:n.func,filter:n.func,openDelay:n.number,position:n.oneOf(["right","left","top","bottom","auto"]),updateInterval:n.number},g.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1},g.contextType=c.ZIndexContext;const f=s.forwardRef((e,t)=>{const o=s.useRef(null),i=s.useRef(null);return s.useImperativeHandle(i,()=>({props:e,element:o.current})),s.useImperativeHandle(t,()=>i.current),s.createElement("div",{ref:o,className:c.classNames("k-popover-actions","k-actions",{[`k-actions-${e.alignment}`]:e.alignment,[`k-actions-${e.orientation}`]:e.orientation})},e.children)}),K={alignment:"stretched",orientation:"horizontal"};f.propTypes={alignment:n.oneOf(["start","center","end","stretched"]),orientation:n.oneOf(["horizontal","vertical"]),children:n.oneOfType([n.element,n.node])},f.defaultProps=K,f.displayName="KendoReactPopoverActionsBar";const F=12e3,V=2e3,D=15,q={top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"},P={top:"k-callout-n",left:"k-callout-w",bottom:"k-callout-s",right:"k-callout-e"},X={top:{vertical:"bottom",horizontal:"center"},left:{vertical:"center",horizontal:"right"},bottom:{vertical:"top",horizontal:"center"},right:{vertical:"center",horizontal:"left"}},H={top:{vertical:"top",horizontal:"center"},left:{vertical:"center",horizontal:"left"},bottom:{vertical:"bottom",horizontal:"center"},right:{vertical:"center",horizontal:"right"}},$=e=>s.Children.toArray(e).filter(t=>t&&t.type===f),Y=e=>s.Children.toArray(e).filter(t=>t&&t.type!==f),b=s.forwardRef((e,t)=>{c.validatePackage(C);const{callout:o,position:i,title:r,children:p,show:J,anchor:Q,appendTo:W,offset:tt,animate:et,positionMode:ot,scale:nt,popoverClass:d,className:it,id:st,style:rt,collision:lt,contentStyle:y,onPosition:O,onClose:k,onOpen:E}=e,[at,A]=s.useState(!1),M=i==="top"||i==="bottom",ct=e.margin||{vertical:o&&M?D:0,horizontal:o&&!M?D:0},pt=X[i],ut=H[i],R=s.useContext(c.ZIndexContext),dt=R?R+V:F,v=s.useRef(null);s.useImperativeHandle(v,()=>({props:e})),s.useImperativeHandle(t,()=>v.current);const ht=s.useCallback(a=>{if(setTimeout(()=>A(a.flipped)),O){const gt={target:v.current,flipped:a.flipped,fitted:a.fitted};O.call(void 0,gt)}},[O,A]),ft=s.useCallback(()=>{if(E){const a={target:v.current};E.call(void 0,a)}},[E]),mt=s.useCallback(()=>{if(k){const a={target:v.current};k.call(void 0,a)}},[k]),w={"k-popover":!0};Array.isArray(d)?d.forEach(a=>w[a]=!0):typeof d=="object"?Object.keys(d).forEach(a=>{w[a]=d[a]}):d&&(w[d]=!0);const vt=at?P[i]:q[i],z=s.useMemo(()=>s.createElement(s.Fragment,null,r&&s.createElement("div",{className:"k-popover-header"},r),s.createElement("div",{className:"k-popover-body",style:y},Y(p)),$(p)),[p,y,r]);return s.createElement(c.ZIndexContext.Provider,{value:dt},s.createElement(L.Popup,{id:st,role:"tooltip",animate:et,collision:lt,anchor:Q,offset:tt,margin:ct,popupAlign:pt,anchorAlign:ut,appendTo:W,show:J,scale:nt,positionMode:ot,style:rt,className:it,popupClass:w,onOpen:ft,onClose:mt,onPosition:ht},o&&i?s.createElement(s.Fragment,null,s.createElement("div",{className:c.classNames("k-popover-callout",vt)}),s.createElement("div",{className:"k-popover-inner"},z)):z))}),G={callout:!0,position:"top",collision:{horizontal:"none",vertical:"none"}};b.propTypes={callout:n.bool,title:n.node,position:n.oneOf(["top","left","bottom","right"]),show:n.bool,animate:n.oneOfType([n.bool,n.shape({openDuration:n.number,closeDuration:n.number})]),anchor:function(e){const t=e.anchor;return t&&typeof t.nodeType!="number"?new Error("Invalid prop `anchor` supplied to `Kendo React Popover`. Validation failed."):null},appendTo:function(e){const t=e.appendTo;return t&&typeof t.nodeType!="number"?new Error("Invalid prop `appendTo` supplied to `Kendo React Popover`. Validation failed."):null},positionMode:n.oneOf(["fixed","absolute"]),scale:n.number,offset:n.shape({left:n.number,top:n.number}),children:n.oneOfType([n.element,n.node]),className:n.oneOfType([n.string,n.arrayOf(n.string),n.object]),id:n.string,popoverClass:n.oneOfType([n.string,n.arrayOf(n.string),n.object]),style:n.object,onClose:n.func,onPosition:n.func,onOpen:n.func},b.defaultProps=G,b.displayName="KendoReactPopover",l.Popover=b,l.PopoverActionsBar=f,l.Tooltip=g,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
|
package/index.mjs
CHANGED
|
@@ -55,7 +55,7 @@ const p = 10, u = 10, ot = (o, t, e, i, r) => {
|
|
|
55
55
|
name: "@progress/kendo-react-tooltip",
|
|
56
56
|
productName: "KendoReact",
|
|
57
57
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
58
|
-
publishDate:
|
|
58
|
+
publishDate: 1706107122,
|
|
59
59
|
version: "",
|
|
60
60
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
61
61
|
}, rt = 100, A = class extends s.PureComponent {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-tooltip",
|
|
3
|
-
"version": "7.0
|
|
3
|
+
"version": "7.1.0-develop.10",
|
|
4
4
|
"description": "React Tooltips library represents popups with information that is related to a UI element. KendoReact Tooltips package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-licensing": "^1.3.4",
|
|
26
|
-
"@progress/kendo-react-common": "7.0
|
|
27
|
-
"@progress/kendo-react-popup": "7.0
|
|
26
|
+
"@progress/kendo-react-common": "7.1.0-develop.10",
|
|
27
|
+
"@progress/kendo-react-popup": "7.1.0-develop.10",
|
|
28
28
|
"@progress/kendo-svg-icons": "^2.1.0",
|
|
29
29
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
30
30
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|