@progress/kendo-react-tooltip 7.0.2 → 7.0.3-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/LICENSE.md +1 -1
- package/NOTICE.txt +1 -1
- package/README.md +1 -1
- package/dist/cdn/js/kendo-react-tooltip.js +1 -1
- package/index.d.mts +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +2 -2
- package/package-metadata.d.ts +1 -1
- package/package.json +4 -4
- package/popover/Popover.d.ts +1 -1
- package/popover/PopoverActionsBar.d.ts +1 -1
- package/popover/interfaces/Align.d.ts +1 -1
- package/popover/interfaces/PopoverActionsBarProps.d.ts +1 -1
- package/popover/interfaces/PopoverAnimation.d.ts +1 -1
- package/popover/interfaces/PopoverCloseEvent.d.ts +1 -1
- package/popover/interfaces/PopoverCollision.d.ts +1 -1
- package/popover/interfaces/PopoverCollisionType.d.ts +1 -1
- package/popover/interfaces/PopoverMargin.d.ts +1 -1
- package/popover/interfaces/PopoverOffset.d.ts +1 -1
- package/popover/interfaces/PopoverOpenEvent.d.ts +1 -1
- package/popover/interfaces/PopoverPosition.d.ts +1 -1
- package/popover/interfaces/PopoverPositionEvent.d.ts +1 -1
- package/popover/interfaces/PopoverPositionMode.d.ts +1 -1
- package/popover/interfaces/PopoverProps.d.ts +1 -1
- package/tooltip/Tooltip.d.ts +1 -1
- package/tooltip/TooltipProps.d.ts +1 -1
- package/tooltip/events.d.ts +1 -1
- package/tooltip/utils.d.ts +1 -1
package/LICENSE.md
CHANGED
|
@@ -8,4 +8,4 @@ This is commercial software. To use it, you need to agree to the [**End User Lic
|
|
|
8
8
|
|
|
9
9
|
All available KendoReact commercial licenses may be obtained at the [KendoReact website](https://www.telerik.com/kendo-react-ui/pricing).
|
|
10
10
|
|
|
11
|
-
*Copyright ©
|
|
11
|
+
*Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
|
package/NOTICE.txt
CHANGED
package/README.md
CHANGED
|
@@ -53,6 +53,6 @@ High-level component overview pages
|
|
|
53
53
|
* [React Popover Component](https://www.telerik.com/kendo-react-ui/popover)
|
|
54
54
|
* [React Tooltip Component](https://www.telerik.com/kendo-react-ui/tooltip)
|
|
55
55
|
|
|
56
|
-
*Copyright ©
|
|
56
|
+
*Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
|
|
57
57
|
|
|
58
58
|
*Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
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"})});
|
package/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
export * from './index';
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { Tooltip } from './tooltip/Tooltip';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("react"),W=require("react-dom"),n=require("prop-types"),a=require("@progress/kendo-react-common"),tt=require("@progress/kendo-react-popup");function N(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=N(Q),et=N(W),c=10,h=10,ot=(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-c:o.left-t-c;case"right":return i==="pointer"?e+c:o.right+c;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-c:e-t+c:e<window.screen.availWidth/2?o.left:o.right-t}},nt=(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+c:e-o-c:e<window.innerHeight/2?t.bottom+h:t.top-o-h}},it=e=>e!==null?e.getBoundingClientRect():document.body.getBoundingClientRect(),st=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],C=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 st.filter(o=>o===e.className).length>0},x={name:"@progress/kendo-react-tooltip",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},rt=100,R=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);C(r)||this.props.open||(clearInterval(this.updateIntervalId),this.willOpen=!1,this.onClose(t))},this.handleMouseOver=t=>{const o=t.target;!this.isVisible(o)||C(o)||o===this.state.targetElement||this.showToolTip(t)},this.handleBodyMousemove=t=>{this.top=t.clientY,this.left=t.clientX},this.onClose=t=>{a.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=it(this.state.targetElement);const i=ot(this.left,t.offsetWidth,o,this.props.anchorElement,this.props.position),r=nt(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:rt,a.validatePackage(x)}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(R,{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&&et.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:a.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:a.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&&a.dispatchEvent(this.props.onOpen,e,this,void 0)}isVisible(e){return!this.props.filter||this.props.filter(e)}};let v=R;v.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};v.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1};v.contextType=a.ZIndexContext;const d=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:a.classNames("k-popover-actions","k-actions",{[`k-actions-${e.alignment}`]:e.alignment,[`k-actions-${e.orientation}`]:e.orientation})},e.children)}),lt={alignment:"stretched",orientation:"horizontal"};d.propTypes={alignment:n.oneOf(["start","center","end","stretched"]),orientation:n.oneOf(["horizontal","vertical"]),children:n.oneOfType([n.element,n.node])};d.defaultProps=lt;d.displayName="KendoReactPopoverActionsBar";const at=12e3,pt=2e3,I=15,ct={top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"},ut={top:"k-callout-n",left:"k-callout-w",bottom:"k-callout-s",right:"k-callout-e"},ht={top:{vertical:"bottom",horizontal:"center"},left:{vertical:"center",horizontal:"right"},bottom:{vertical:"top",horizontal:"center"},right:{vertical:"center",horizontal:"left"}},dt={top:{vertical:"top",horizontal:"center"},left:{vertical:"center",horizontal:"left"},bottom:{vertical:"bottom",horizontal:"center"},right:{vertical:"center",horizontal:"right"}},ft=e=>s.Children.toArray(e).filter(t=>t&&t.type===d),mt=e=>s.Children.toArray(e).filter(t=>t&&t.type!==d),g=s.forwardRef((e,t)=>{a.validatePackage(x);const{callout:o,position:i,title:r,children:p,show:D,anchor:A,appendTo:M,offset:z,animate:L,positionMode:S,scale:U,popoverClass:u,className:_,id:B,style:Z,collision:j,contentStyle:T,onPosition:y,onClose:b,onOpen:k}=e,[F,w]=s.useState(!1),O=i==="top"||i==="bottom",K=e.margin||{vertical:o&&O?I:0,horizontal:o&&!O?I:0},V=ht[i],q=dt[i],P=s.useContext(a.ZIndexContext),X=P?P+pt:at,f=s.useRef(null);s.useImperativeHandle(f,()=>({props:e})),s.useImperativeHandle(t,()=>f.current);const H=s.useCallback(l=>{if(setTimeout(()=>w(l.flipped)),y){const J={target:f.current,flipped:l.flipped,fitted:l.fitted};y.call(void 0,J)}},[y,w]),$=s.useCallback(()=>{if(k){const l={target:f.current};k.call(void 0,l)}},[k]),Y=s.useCallback(()=>{if(b){const l={target:f.current};b.call(void 0,l)}},[b]),m={"k-popover":!0};Array.isArray(u)?u.forEach(l=>m[l]=!0):typeof u=="object"?Object.keys(u).forEach(l=>{m[l]=u[l]}):u&&(m[u]=!0);const G=F?ut[i]:ct[i],E=s.useMemo(()=>s.createElement(s.Fragment,null,r&&s.createElement("div",{className:"k-popover-header"},r),s.createElement("div",{className:"k-popover-body",style:T},mt(p)),ft(p)),[p,T,r]);return s.createElement(a.ZIndexContext.Provider,{value:X},s.createElement(tt.Popup,{id:B,role:"tooltip",animate:L,collision:j,anchor:A,offset:z,margin:K,popupAlign:V,anchorAlign:q,appendTo:M,show:D,scale:U,positionMode:S,style:Z,className:_,popupClass:m,onOpen:$,onClose:Y,onPosition:H},o&&i?s.createElement(s.Fragment,null,s.createElement("div",{className:a.classNames("k-popover-callout",G)}),s.createElement("div",{className:"k-popover-inner"},E)):E))}),vt={callout:!0,position:"top",collision:{horizontal:"none",vertical:"none"}};g.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};g.defaultProps=vt;g.displayName="KendoReactPopover";exports.Popover=g;exports.PopoverActionsBar=d;exports.Tooltip=v;
|
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
"use client";
|
|
@@ -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: 1704459473,
|
|
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-metadata.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { PackageMetadata } from '@progress/kendo-licensing';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-tooltip",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3-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,9 +23,9 @@
|
|
|
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.
|
|
28
|
-
"@progress/kendo-svg-icons": "^2.
|
|
26
|
+
"@progress/kendo-react-common": "7.0.3-develop.10",
|
|
27
|
+
"@progress/kendo-react-popup": "7.0.3-develop.10",
|
|
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"
|
|
31
31
|
},
|
package/popover/Popover.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import * as React from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import * as React from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { Align as AlignBase } from '@progress/kendo-react-popup';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { PopupAnimation } from '@progress/kendo-react-popup';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { PopoverHandle } from '../Popover';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { PopoverCollisionType } from './PopoverCollisionType';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { CollisionType as CollisionTypeBase } from '@progress/kendo-react-popup';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { Margin as MarginBase } from '@progress/kendo-react-popup';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { Offset as OffsetBase } from '@progress/kendo-react-popup';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { PopoverHandle } from '../Popover';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { PopoverHandle } from '../Popover';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { PositionMode as PositionModeBase } from '@progress/kendo-react-popup';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { PopoverCollision } from './PopoverCollision';
|
package/tooltip/Tooltip.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import * as React from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { TooltipEvent, TooltipPositionEvent } from './events';
|
package/tooltip/events.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
import { BaseEvent } from '@progress/kendo-react-common';
|
package/tooltip/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
5
|
/**
|