@progress/kendo-react-tooltip 14.5.0-develop.13 → 14.5.0-develop.15
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/package-metadata.mjs +2 -2
- package/package.json +4 -4
- package/popover/Popover.js +1 -1
- package/popover/Popover.mjs +82 -80
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactTooltip={},e.React,e.ReactDOM,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup)}(this,function(e,t,o,n,r,l){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}}),t.default=e,Object.freeze(t)}var i=a(t),c=a(o);const s=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],u=e=>{if(null===e)return!1;let t=e;for(;t;){if(null!==t&&t.classList&&t.classList.contains("k-tooltip"))return!0;t=null!==t.parentNode&&t.parentNode}return s.filter(t=>t===e.className).length>0},p={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1},d=i.forwardRef((e,t)=>{const{showOption:o,open:n,targetElement:r,onOpen:l,onClose:a,onPosition:c,children:s,...u}=e;let p=null;const d=void 0===(null==o?void 0:o.hover)||(null==o?void 0:o.hover),m=void 0!==(null==o?void 0:o.click)&&(null==o?void 0:o.click),v=void 0!==(null==o?void 0:o.focus)&&(null==o?void 0:o.focus),h=void 0!==(null==o?void 0:o.none)&&(null==o?void 0:o.none),g=(void 0!==(null==o?void 0:o.keys)?null==o?void 0:o.keys:[]).map(e=>"Space"===e?" ":e);return i.createElement("div",{onMouseOver:e=>{p&&!h&&d&&p.handleMouseOver(e)},onMouseLeave:e=>{p&&!h&&d&&p.handleMouseLeave(e)},onClick:e=>{p&&!h&&m&&p.handleTargetItemClick(e)},onFocus:e=>{p&&!h&&v&&p.handleMouseOver(e)},onKeyDown:e=>{(p&&!h&&g.length>0||p&&!h&&"Escape"===e.key)&&p.handleKeyDown(e,g)}},i.createElement(f,{ref:e=>{p=e,t&&("function"==typeof t?t(e):t.current=e)},open:n,targetElement:r,onOpen:l,onClose:a,onPosition:c,...u}),s)});d.displayName="KendoReactTooltipWrapper";const f=i.memo(i.forwardRef((e,t)=>{const{anchorElement:o=p.anchorElement,openDelay:n=p.openDelay,position:l=p.position,showCallout:a=p.showCallout,parentTitle:s=p.parentTitle,open:d,targetElement:f,content:m,filter:v,updateInterval:h,onOpen:g,onClose:y,onPosition:k,appendTo:b,className:E,style:w,id:C,tooltipClassName:T,tooltipStyle:O,setCalloutOnPositionAuto:N,themeColor:R}=e,x=i.useContext(r.ZIndexContext),[P,I]=i.useState(null),[A,D]=i.useState(!1),[K,S]=i.useState(""),M=i.useRef(0),j=i.useRef(0),z=i.useRef(void 0),L=i.useRef(void 0),q=i.useRef(!1),H=i.useRef(K),F=i.useRef(P),B=i.useRef(A);i.useEffect(()=>{F.current=P,B.current=A,H.current=K},[P,A,K]);const W=void 0!==d,Z=e=>{let t=e;for(;t;){if(null!==t.getAttribute("title")||t.titleExpando)return{title:t.getAttribute("title")||t.titleExpando,element:t};t=s&&t.parentElement||null}return{title:"",element:null}},$=()=>{switch(l){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 M.current<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},U=(e,t)=>{if(!t)return{left:0,top:0};const n=(e=>null!==e?e.getBoundingClientRect():document.body.getBoundingClientRect())(t),r=((e,t,o,n,r)=>{switch(r){case"bottom":case"top":return"pointer"===n?e-t/2:o.left-t/2+o.width/2;case"left":return"pointer"===n?e-t-10:o.left-t-10;case"right":return"pointer"===n?e+10:o.right+10;default:return"pointer"===n?e<window.screen.availWidth/2?e-10:e-t+10:e<window.screen.availWidth/2?o.left:o.right-t}})(j.current,e.offsetWidth,n,o,l),a=((e,t,o,n,r)=>{switch(r){case"bottom":return"pointer"===n?e+10:t.bottom+10;case"left":case"right":return"pointer"===n?e-o/2:t.top-o/2+t.height/2;case"top":return"pointer"===n?e-o-10:t.top-o-10;default:return"pointer"===n?e<window.innerHeight/2?e+10:e-o-10:e<window.innerHeight/2?t.bottom+10:t.top-o-10}})(M.current,n,e.offsetHeight,o,l);return{left:r,top:a}},V=e=>{r.dispatchEvent(y,e,void 0,void 0),I(null),D(!1),S("")},X=e=>{clearTimeout(z.current),clearInterval(L.current),e.target.hasChildNodes()&&e.target.childNodes.forEach(t=>{"title"===t.nodeName&&(e.target.titleExpando=t.innerHTML,t.remove())});const t=f||e.target,o=Z(t),l=W?d:B.current;if(!o.title)return void(l&&V(e));o.element&&(o.element.titleExpando=o.title,o.element.title=""),q.current=!0;const a=()=>{I(o.element||t),D(!0),S(o.title),h&&(L.current=setInterval(()=>{const e=t;if(e)if(null===e.parentElement)V({target:e});else{const t=Z(e);t.title&&t.title!==H.current&&S(t.title)}},h))};n?z.current=window.setTimeout(()=>{q.current&&a()},n):a(),H.current!==o.title&&r.dispatchEvent(g,e,void 0,void 0)},Y=e=>{const t=e.target;!(e=>!v||v(e))(t)||u(t)||t===F.current||X(e)},_=e=>{const t=F.current?F.current.ownerDocument:document,o=null==t?void 0:t.elementFromPoint(e.clientX,e.clientY);u(o)||d||(clearInterval(L.current),q.current=!1,V(e))},G=e=>F.current===e.nativeEvent.target,J=e=>{const t=G(e);(W?d:B.current)&&t?V(e):X(e)},Q=(e,t)=>{const o=e.key;"Escape"===e.key?(e=>{const t=G(e);(W?d:B.current)&&t&&V(e)})(e):t.includes(o)&&Y(e)},ee=i.useCallback(e=>{M.current=e.clientY,j.current=e.clientX},[]);i.useEffect(()=>(document&&document.body.addEventListener("mousemove",ee),()=>{clearTimeout(z.current),clearInterval(L.current),document&&document.body.removeEventListener("mousemove",ee)}),[ee]),i.useEffect(()=>{if(d&&f){let e=f,t="",o=null;for(;e;){if(null!==e.getAttribute("title")||e.titleExpando){t=e.getAttribute("title")||e.titleExpando,o=e;break}e=s&&e.parentElement||null}t&&(o&&(o.titleExpando=t,o.title=""),I(f),D(!0),S(t))}else!1===d&&(I(null),D(!1),S(""))},[d,f,s]);const te=i.useMemo(()=>({handleMouseOver:Y,handleMouseLeave:_,handleTargetItemClick:J,handleKeyDown:Q,props:e}),[e]);i.useImperativeHandle(t,()=>te,[te]);const oe=x||100,ne=i.useCallback(e=>{if(!e)return;let t;if(k){const n={element:e,targetElement:P,mouseTop:M.current,mouseLeft:j.current,anchorElement:o,position:l,target:te,syntheticEvent:null,nativeEvent:null};t=k(n)}else t=U(e,P);e.style.left=t.left+"px",e.style.top=t.top+"px"},[k,P,o,l,U,te]),re=i.useCallback(e=>{e&&(e.className=$(),"auto"===l&&(j.current<window.screen.availWidth/2?e.style.left=N||"25%":e.style.left=N||"75%"))},[$,l,N]);return!1===d?null:P&&K&&P.ownerDocument&&c.createPortal(i.createElement("div",{ref:ne,className:r.classNames("k-animation-container","k-animation-container-fixed","k-animation-container-shown",E),style:{zIndex:oe,...w},tabIndex:0},i.createElement("div",{className:"k-child-animation-container"},i.createElement("div",{id:C,role:"tooltip",className:r.classNames("k-tooltip",T,{[`k-tooltip-${R}`]:R}),style:{position:"relative",...O}},i.createElement("div",{className:"k-tooltip-content"},m&&i.createElement(m,{title:K,target:P})||K),a&&i.createElement("div",{ref:re})))),b||P.ownerDocument.body)}));f.displayName="KendoReactTooltipCore";const m=i.forwardRef((e,t)=>e.children?i.createElement(d,{ref:t,...e}):i.createElement(f,{ref:t,...e}));m.displayName="KendoReactTooltip",m.propTypes={id:n.string,anchorElement:n.string,appendTo:n.any,position:n.oneOf(["auto","top","bottom","left","right"]),showCallout:n.bool,parentTitle:n.bool,content:n.any,open:n.bool,targetElement:n.any,filter:n.func,openDelay:n.number,updateInterval:n.number,onOpen:n.func,onClose:n.func,onPosition:n.func,className:n.string,style:n.object,tooltipClassName:n.string,tooltipStyle:n.object,setCalloutOnPositionAuto:n.string,showOption:n.shape({hover:n.bool,click:n.bool,focus:n.bool,none:n.bool,keys:n.arrayOf(n.string)}),children:n.node,themeColor:n.oneOf(["base","inverse","info","success","warning","error"])};const v=i.forwardRef((e,t)=>{const o=i.useRef(null),n=i.useRef(null),{alignment:l=h.alignment,orientation:a=h.orientation}=e;return i.useImperativeHandle(n,()=>({props:e,element:o.current})),i.useImperativeHandle(t,()=>n.current),i.createElement("div",{ref:o,className:r.classNames("k-popover-actions","k-actions",{[`k-actions-${l}`]:l,[`k-actions-${a}`]:a})},e.children)}),h={alignment:"stretched",orientation:"horizontal"};v.propTypes={alignment:n.oneOf(["start","center","end","stretched"]),orientation:n.oneOf(["horizontal","vertical"]),children:n.oneOfType([n.element,n.node])},v.displayName="KendoReactPopoverActionsBar";const g=e=>{if(e){const t=e.querySelectorAll(r.FOCUSABLE_ELEMENTS.join(", "));if(t.length)return t[0]}},y=e=>{const t=g(document.querySelector(".k-popover-inner")),o=(e=>{if(e){const t=e.querySelectorAll(r.FOCUSABLE_ELEMENTS.join(", "));if(t.length)return t[t.length-1]}})(document.querySelector(".k-popover-inner"));e.shiftKey&&e.target===t?(o&&o.focus(),e.preventDefault()):!e.shiftKey&&e.target===o&&(t&&t.focus(),e.preventDefault())},k={top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"},b={top:"k-callout-n",left:"k-callout-w",bottom:"k-callout-s",right:"k-callout-e"},E={top:{vertical:"bottom",horizontal:"center"},left:{vertical:"center",horizontal:"right"},bottom:{vertical:"top",horizontal:"center"},right:{vertical:"center",horizontal:"left"}},w={top:{vertical:"top",horizontal:"center"},left:{vertical:"center",horizontal:"left"},bottom:{vertical:"bottom",horizontal:"center"},right:{vertical:"center",horizontal:"right"}},C=i.forwardRef((e,t)=>{const{autoFocus:o=!0,callout:n=T.callout,position:a=T.position,collision:c=T.collision,title:s,children:u,show:p,anchor:d,appendTo:f,offset:m,animate:h,positionMode:C,scale:O,popoverClass:N,className:R,id:x,style:P,contentStyle:I,onPosition:A,onClose:D,onOpen:K,onKeyDown:S}=e,[M,j]=i.useState(!1),z="top"===a||"bottom"===a,L=e.margin||{vertical:n&&z?15:0,horizontal:n&&!z?15:0},q=E[a],H=w[a],F=i.useContext(r.ZIndexContext),B=F?F+2e3:12e3,W=i.useRef(null);i.useImperativeHandle(W,()=>({props:e})),i.useImperativeHandle(t,()=>W.current);const Z=i.useCallback(e=>{if(setTimeout(()=>j(e.flipped)),A){const t={target:W.current,flipped:e.flipped,fitted:e.fitted};A.call(void 0,t)}},[A,j]),$=i.useCallback(()=>{if(o){const e=g(document.querySelector(".k-popover-inner"));e&&e.focus()}if(K){const e={target:W.current};K.call(void 0,e)}},[K]),U=i.useCallback(e=>{if(S&&"Escape"===e.key){const e={target:W.current,show:!1};S.call(void 0,e)}"Tab"===e.key&&y(e)},[S]),V=i.useCallback(e=>{if(D){const e={target:W.current};D.call(void 0,e)}e&&e.target&&e.target.props&&e.target.props.anchor&&e.target.props.anchor.focus()},[D]),X={"k-popover":!0};Array.isArray(N)?N.forEach(e=>X[e]=!0):"object"==typeof N?Object.keys(N).forEach(e=>{X[e]=N[e]}):N&&(X[N]=!0);const Y=M?b[a]:k[a],_=i.useMemo(()=>i.createElement(i.Fragment,null,s&&i.createElement("div",{className:"k-popover-header"},s),i.createElement("div",{className:"k-popover-body",style:I},(e=>i.Children.toArray(e).filter(e=>e&&e.type!==v))(u)),(e=>i.Children.toArray(e).filter(e=>e&&e.type===v))(u)),[u,I,s]);return i.createElement(r.ZIndexContext.Provider,{value:B},i.createElement(l.Popup,{id:x,role:"tooltip",animate:h,collision:c,anchor:d,offset:m,margin:L,popupAlign:q,anchorAlign:H,appendTo:f,show:p,scale:O,positionMode:C,style:P,className:R,popupClass:X,onOpen:$,onClose:V,onPosition:Z,onKeyDown:U},n&&a?i.createElement(i.Fragment,null,i.createElement("div",{className:r.classNames("k-popover-callout",Y)}),i.createElement("div",{className:"k-popover-inner"},_)):_))}),T={callout:!0,position:"top",collision:{horizontal:"none",vertical:"none"}};C.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&&"number"!=typeof t.nodeType?new Error("Invalid prop `anchor` supplied to `Kendo React Popover`. Validation failed."):null},appendTo:function(e){const t=e.appendTo;return t&&"number"!=typeof t.nodeType?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},C.displayName="KendoReactPopover",e.Popover=C,e.PopoverActionsBar=v,e.Tooltip=m});
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactTooltip={},e.React,e.ReactDOM,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup)}(this,function(e,t,o,n,r,l){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}}),t.default=e,Object.freeze(t)}var i=a(t),c=a(o);const s=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],u=e=>{if(null===e)return!1;let t=e;for(;t;){if(null!==t&&t.classList&&t.classList.contains("k-tooltip"))return!0;t=null!==t.parentNode&&t.parentNode}return s.filter(t=>t===e.className).length>0},p={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1},d=i.forwardRef((e,t)=>{const{showOption:o,open:n,targetElement:r,onOpen:l,onClose:a,onPosition:c,children:s,...u}=e;let p=null;const d=void 0===(null==o?void 0:o.hover)||(null==o?void 0:o.hover),m=void 0!==(null==o?void 0:o.click)&&(null==o?void 0:o.click),v=void 0!==(null==o?void 0:o.focus)&&(null==o?void 0:o.focus),h=void 0!==(null==o?void 0:o.none)&&(null==o?void 0:o.none),y=(void 0!==(null==o?void 0:o.keys)?null==o?void 0:o.keys:[]).map(e=>"Space"===e?" ":e);return i.createElement("div",{onMouseOver:e=>{p&&!h&&d&&p.handleMouseOver(e)},onMouseLeave:e=>{p&&!h&&d&&p.handleMouseLeave(e)},onClick:e=>{p&&!h&&m&&p.handleTargetItemClick(e)},onFocus:e=>{p&&!h&&v&&p.handleMouseOver(e)},onKeyDown:e=>{(p&&!h&&y.length>0||p&&!h&&"Escape"===e.key)&&p.handleKeyDown(e,y)}},i.createElement(f,{ref:e=>{p=e,t&&("function"==typeof t?t(e):t.current=e)},open:n,targetElement:r,onOpen:l,onClose:a,onPosition:c,...u}),s)});d.displayName="KendoReactTooltipWrapper";const f=i.memo(i.forwardRef((e,t)=>{const{anchorElement:o=p.anchorElement,openDelay:n=p.openDelay,position:l=p.position,showCallout:a=p.showCallout,parentTitle:s=p.parentTitle,open:d,targetElement:f,content:m,filter:v,updateInterval:h,onOpen:y,onClose:g,onPosition:k,appendTo:b,className:E,style:w,id:C,tooltipClassName:T,tooltipStyle:O,setCalloutOnPositionAuto:N,themeColor:R}=e,x=i.useContext(r.ZIndexContext),[P,I]=i.useState(null),[D,A]=i.useState(!1),[K,S]=i.useState(""),M=i.useRef(0),j=i.useRef(0),z=i.useRef(void 0),L=i.useRef(void 0),q=i.useRef(!1),H=i.useRef(K),B=i.useRef(P),F=i.useRef(D);i.useEffect(()=>{B.current=P,F.current=D,H.current=K},[P,D,K]);const W=void 0!==d,$=e=>{let t=e;for(;t;){if(null!==t.getAttribute("title")||t.titleExpando)return{title:t.getAttribute("title")||t.titleExpando,element:t};t=s&&t.parentElement||null}return{title:"",element:null}},Z=()=>{switch(l){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 M.current<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},U=(e,t)=>{if(!t)return{left:0,top:0};const n=(e=>null!==e?e.getBoundingClientRect():document.body.getBoundingClientRect())(t),r=((e,t,o,n,r)=>{switch(r){case"bottom":case"top":return"pointer"===n?e-t/2:o.left-t/2+o.width/2;case"left":return"pointer"===n?e-t-10:o.left-t-10;case"right":return"pointer"===n?e+10:o.right+10;default:return"pointer"===n?e<window.screen.availWidth/2?e-10:e-t+10:e<window.screen.availWidth/2?o.left:o.right-t}})(j.current,e.offsetWidth,n,o,l),a=((e,t,o,n,r)=>{switch(r){case"bottom":return"pointer"===n?e+10:t.bottom+10;case"left":case"right":return"pointer"===n?e-o/2:t.top-o/2+t.height/2;case"top":return"pointer"===n?e-o-10:t.top-o-10;default:return"pointer"===n?e<window.innerHeight/2?e+10:e-o-10:e<window.innerHeight/2?t.bottom+10:t.top-o-10}})(M.current,n,e.offsetHeight,o,l);return{left:r,top:a}},V=e=>{r.dispatchEvent(g,e,void 0,void 0),I(null),A(!1),S("")},X=e=>{clearTimeout(z.current),clearInterval(L.current),e.target.hasChildNodes()&&e.target.childNodes.forEach(t=>{"title"===t.nodeName&&(e.target.titleExpando=t.innerHTML,t.remove())});const t=f||e.target,o=$(t),l=W?d:F.current;if(!o.title)return void(l&&V(e));o.element&&(o.element.titleExpando=o.title,o.element.title=""),q.current=!0;const a=()=>{I(o.element||t),A(!0),S(o.title),h&&(L.current=setInterval(()=>{const e=t;if(e)if(null===e.parentElement)V({target:e});else{const t=$(e);t.title&&t.title!==H.current&&S(t.title)}},h))};n?z.current=window.setTimeout(()=>{q.current&&a()},n):a(),H.current!==o.title&&r.dispatchEvent(y,e,void 0,void 0)},Y=e=>{const t=e.target;!(e=>!v||v(e))(t)||u(t)||t===B.current||X(e)},_=e=>{const t=B.current?B.current.ownerDocument:document,o=null==t?void 0:t.elementFromPoint(e.clientX,e.clientY);u(o)||d||(clearInterval(L.current),q.current=!1,V(e))},G=e=>B.current===e.nativeEvent.target,J=e=>{const t=G(e);(W?d:F.current)&&t?V(e):X(e)},Q=(e,t)=>{const o=e.key;"Escape"===e.key?(e=>{const t=G(e);(W?d:F.current)&&t&&V(e)})(e):t.includes(o)&&Y(e)},ee=i.useCallback(e=>{M.current=e.clientY,j.current=e.clientX},[]);i.useEffect(()=>(document&&document.body.addEventListener("mousemove",ee),()=>{clearTimeout(z.current),clearInterval(L.current),document&&document.body.removeEventListener("mousemove",ee)}),[ee]),i.useEffect(()=>{if(d&&f){let e=f,t="",o=null;for(;e;){if(null!==e.getAttribute("title")||e.titleExpando){t=e.getAttribute("title")||e.titleExpando,o=e;break}e=s&&e.parentElement||null}t&&(o&&(o.titleExpando=t,o.title=""),I(f),A(!0),S(t))}else!1===d&&(I(null),A(!1),S(""))},[d,f,s]);const te=i.useMemo(()=>({handleMouseOver:Y,handleMouseLeave:_,handleTargetItemClick:J,handleKeyDown:Q,props:e}),[e]);i.useImperativeHandle(t,()=>te,[te]);const oe=x||100,ne=i.useCallback(e=>{if(!e)return;let t;if(k){const n={element:e,targetElement:P,mouseTop:M.current,mouseLeft:j.current,anchorElement:o,position:l,target:te,syntheticEvent:null,nativeEvent:null};t=k(n)}else t=U(e,P);e.style.left=t.left+"px",e.style.top=t.top+"px"},[k,P,o,l,U,te]),re=i.useCallback(e=>{e&&(e.className=Z(),"auto"===l&&(j.current<window.screen.availWidth/2?e.style.left=N||"25%":e.style.left=N||"75%"))},[Z,l,N]);return!1===d?null:P&&K&&P.ownerDocument&&c.createPortal(i.createElement("div",{ref:ne,className:r.classNames("k-animation-container","k-animation-container-fixed","k-animation-container-shown",E),style:{zIndex:oe,...w},tabIndex:0},i.createElement("div",{className:"k-child-animation-container"},i.createElement("div",{id:C,role:"tooltip",className:r.classNames("k-tooltip",T,{[`k-tooltip-${R}`]:R}),style:{position:"relative",...O}},i.createElement("div",{className:"k-tooltip-content"},m&&i.createElement(m,{title:K,target:P})||K),a&&i.createElement("div",{ref:re})))),b||P.ownerDocument.body)}));f.displayName="KendoReactTooltipCore";const m=i.forwardRef((e,t)=>e.children?i.createElement(d,{ref:t,...e}):i.createElement(f,{ref:t,...e}));m.displayName="KendoReactTooltip",m.propTypes={id:n.string,anchorElement:n.string,appendTo:n.any,position:n.oneOf(["auto","top","bottom","left","right"]),showCallout:n.bool,parentTitle:n.bool,content:n.any,open:n.bool,targetElement:n.any,filter:n.func,openDelay:n.number,updateInterval:n.number,onOpen:n.func,onClose:n.func,onPosition:n.func,className:n.string,style:n.object,tooltipClassName:n.string,tooltipStyle:n.object,setCalloutOnPositionAuto:n.string,showOption:n.shape({hover:n.bool,click:n.bool,focus:n.bool,none:n.bool,keys:n.arrayOf(n.string)}),children:n.node,themeColor:n.oneOf(["base","inverse","info","success","warning","error"])};const v=i.forwardRef((e,t)=>{const o=i.useRef(null),n=i.useRef(null),{alignment:l=h.alignment,orientation:a=h.orientation}=e;return i.useImperativeHandle(n,()=>({props:e,element:o.current})),i.useImperativeHandle(t,()=>n.current),i.createElement("div",{ref:o,className:r.classNames("k-popover-actions","k-actions",{[`k-actions-${l}`]:l,[`k-actions-${a}`]:a})},e.children)}),h={alignment:"stretched",orientation:"horizontal"};v.propTypes={alignment:n.oneOf(["start","center","end","stretched"]),orientation:n.oneOf(["horizontal","vertical"]),children:n.oneOfType([n.element,n.node])},v.displayName="KendoReactPopoverActionsBar";const y=e=>{if(e){const t=e.querySelectorAll(r.FOCUSABLE_ELEMENTS.join(", "));if(t.length)return t[0]}},g=e=>{const t=y(document.querySelector(".k-popover-inner")),o=(e=>{if(e){const t=e.querySelectorAll(r.FOCUSABLE_ELEMENTS.join(", "));if(t.length)return t[t.length-1]}})(document.querySelector(".k-popover-inner"));e.shiftKey&&e.target===t?(o&&o.focus(),e.preventDefault()):!e.shiftKey&&e.target===o&&(t&&t.focus(),e.preventDefault())},k={top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"},b={top:"k-callout-n",left:"k-callout-w",bottom:"k-callout-s",right:"k-callout-e"},E={top:{vertical:"bottom",horizontal:"center"},left:{vertical:"center",horizontal:"right"},bottom:{vertical:"top",horizontal:"center"},right:{vertical:"center",horizontal:"left"}},w={top:{vertical:"top",horizontal:"center"},left:{vertical:"center",horizontal:"left"},bottom:{vertical:"bottom",horizontal:"center"},right:{vertical:"center",horizontal:"right"}},C=e=>i.Children.toArray(e).filter(e=>e&&e.type===v),T=e=>i.Children.toArray(e).filter(e=>e&&e.type!==v),O=i.forwardRef((e,t)=>{const{autoFocus:o=!0,callout:n=N.callout,position:a=N.position,collision:c=N.collision,title:s,children:u,show:p,anchor:d,appendTo:f,offset:m,animate:v,positionMode:h,scale:O,popoverClass:R,className:x,id:P,style:I,contentStyle:D,onPosition:A,onClose:K,onOpen:S,onKeyDown:M}=e,[j,z]=i.useState(!1),L="top"===a||"bottom"===a,q=e.margin||{vertical:n&&L?15:0,horizontal:n&&!L?15:0},H=E[a],B=w[a],F=i.useContext(r.ZIndexContext),W=F?F+2e3:12e3,$=i.useRef(null),Z=r.useId(P)||"k-popover-1",U=`${Z}-header`,V=`${Z}-body`;i.useImperativeHandle($,()=>({props:e})),i.useImperativeHandle(t,()=>$.current);const X=i.useCallback(e=>{if(setTimeout(()=>z(e.flipped)),A){const t={target:$.current,flipped:e.flipped,fitted:e.fitted};A.call(void 0,t)}},[A,z]),Y=i.useCallback(()=>{if(o){const e=y(document.querySelector(".k-popover-inner"));e&&e.focus()}if(S){const e={target:$.current};S.call(void 0,e)}},[S]),_=i.useCallback(e=>{if(M&&"Escape"===e.key){const e={target:$.current,show:!1};M.call(void 0,e)}"Tab"===e.key&&g(e)},[M]),G=i.useCallback(e=>{if(K){const e={target:$.current};K.call(void 0,e)}e&&e.target&&e.target.props&&e.target.props.anchor&&e.target.props.anchor.focus()},[K]),J={"k-popover":!0};Array.isArray(R)?R.forEach(e=>J[e]=!0):"object"==typeof R?Object.keys(R).forEach(e=>{J[e]=R[e]}):R&&(J[R]=!0);const Q=j?b[a]:k[a],ee=i.useMemo(()=>i.createElement(i.Fragment,null,s&&i.createElement("div",{className:"k-popover-header",id:U},s),i.createElement("div",{className:"k-popover-body",id:V,style:D},T(u)),C(u)),[u,D,s,U,V]);return i.createElement(r.ZIndexContext.Provider,{value:W},i.createElement(l.Popup,{id:P,role:"dialog",ariaLabelledBy:s?U:void 0,ariaDescribedBy:V,animate:v,collision:c,anchor:d,offset:m,margin:q,popupAlign:H,anchorAlign:B,appendTo:f,show:p,scale:O,positionMode:h,style:I,className:x,popupClass:J,onOpen:Y,onClose:G,onPosition:X,onKeyDown:_},n&&a?i.createElement(i.Fragment,null,i.createElement("div",{className:r.classNames("k-popover-callout",Q)}),i.createElement("div",{className:"k-popover-inner"},ee)):ee))}),N={callout:!0,position:"top",collision:{horizontal:"none",vertical:"none"}};O.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&&"number"!=typeof t.nodeType?new Error("Invalid prop `anchor` supplied to `Kendo React Popover`. Validation failed."):null},appendTo:function(e){const t=e.appendTo;return t&&"number"!=typeof t.nodeType?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},O.displayName="KendoReactPopover",e.Popover=O,e.PopoverActionsBar=v,e.Tooltip=m});
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
|
|
|
7
7
|
productName: 'KendoReact',
|
|
8
8
|
productCode: 'KENDOUIREACT',
|
|
9
9
|
productCodes: ['KENDOUIREACT'],
|
|
10
|
-
publishDate:
|
|
11
|
-
version: '14.5.0-develop.
|
|
10
|
+
publishDate: 1778773560,
|
|
11
|
+
version: '14.5.0-develop.15',
|
|
12
12
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-tooltip",
|
|
3
|
-
"version": "14.5.0-develop.
|
|
3
|
+
"version": "14.5.0-develop.15",
|
|
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",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.2",
|
|
29
|
-
"@progress/kendo-react-common": "14.5.0-develop.
|
|
30
|
-
"@progress/kendo-react-popup": "14.5.0-develop.
|
|
29
|
+
"@progress/kendo-react-common": "14.5.0-develop.15",
|
|
30
|
+
"@progress/kendo-react-popup": "14.5.0-develop.15",
|
|
31
31
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
32
32
|
"react": "^18.0.0 || ^19.0.0",
|
|
33
33
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"package": {
|
|
57
57
|
"productName": "KendoReact",
|
|
58
58
|
"productCode": "KENDOUIREACT",
|
|
59
|
-
"publishDate":
|
|
59
|
+
"publishDate": 1778773560,
|
|
60
60
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
61
61
|
}
|
|
62
62
|
},
|
package/popover/Popover.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("react"),e=require("prop-types"),f=require("@progress/kendo-react-common"),ee=require("@progress/kendo-react-popup"),N=require("./PopoverActionsBar.js"),R=require("./utils.js");function oe(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const c in n)if(c!=="default"){const i=Object.getOwnPropertyDescriptor(n,c);Object.defineProperty(r,c,i.get?i:{enumerable:!0,get:()=>n[c]})}}return r.default=n,Object.freeze(r)}const t=oe(Y),te=12e3,ne=2e3,D=15,re={top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"},le={top:"k-callout-n",left:"k-callout-w",bottom:"k-callout-s",right:"k-callout-e"},ae={top:{vertical:"bottom",horizontal:"center"},left:{vertical:"center",horizontal:"right"},bottom:{vertical:"top",horizontal:"center"},right:{vertical:"center",horizontal:"left"}},ce={top:{vertical:"top",horizontal:"center"},left:{vertical:"center",horizontal:"left"},bottom:{vertical:"bottom",horizontal:"center"},right:{vertical:"center",horizontal:"right"}},ie=n=>t.Children.toArray(n).filter(r=>r&&r.type===N.PopoverActionsBar),se=n=>t.Children.toArray(n).filter(r=>r&&r.type!==N.PopoverActionsBar),O=t.forwardRef((n,r)=>{const{autoFocus:c=!0,callout:i=k.callout,position:l=k.position,collision:j=k.collision,title:u,children:m,show:x,anchor:F,appendTo:S,offset:B,animate:_,positionMode:q,scale:K,popoverClass:a,className:Z,id:C,style:M,contentStyle:E,onPosition:v,onClose:b,onOpen:h,onKeyDown:y}=n,[V,T]=t.useState(!1),A=l==="top"||l==="bottom",L=n.margin||{vertical:i&&A?D:0,horizontal:i&&!A?D:0},H=ae[l],U=ce[l],I=t.useContext(f.ZIndexContext),X=I?I+ne:te,s=t.useRef(null),w=f.useId(C)||"k-popover-1",g=`${w}-header`,P=`${w}-body`;t.useImperativeHandle(s,()=>({props:n})),t.useImperativeHandle(r,()=>s.current);const $=t.useCallback(o=>{if(setTimeout(()=>T(o.flipped)),v){const p={target:s.current,flipped:o.flipped,fitted:o.fitted};v.call(void 0,p)}},[v,T]),G=t.useCallback(()=>{if(c){const o=R.getFirstFocusableElement(document.querySelector(".k-popover-inner"));o&&o.focus()}if(h){const o={target:s.current};h.call(void 0,o)}},[h]),J=t.useCallback(o=>{if(y&&o.key==="Escape"){const p={target:s.current,show:!1};y.call(void 0,p)}o.key==="Tab"&&R.handleFocusTrap(o)},[y]),Q=t.useCallback(o=>{if(b){const p={target:s.current};b.call(void 0,p)}o&&o.target&&o.target.props&&o.target.props.anchor&&o.target.props.anchor.focus()},[b]),d={"k-popover":!0};Array.isArray(a)?a.forEach(o=>d[o]=!0):typeof a=="object"?Object.keys(a).forEach(o=>{d[o]=a[o]}):a&&(d[a]=!0);const W=V?le[l]:re[l],z=t.useMemo(()=>t.createElement(t.Fragment,null,u&&t.createElement("div",{className:"k-popover-header",id:g},u),t.createElement("div",{className:"k-popover-body",id:P,style:E},se(m)),ie(m)),[m,E,u,g,P]);return t.createElement(f.ZIndexContext.Provider,{value:X},t.createElement(ee.Popup,{id:C,role:"dialog",ariaLabelledBy:u?g:void 0,ariaDescribedBy:P,animate:_,collision:j,anchor:F,offset:B,margin:L,popupAlign:H,anchorAlign:U,appendTo:S,show:x,scale:K,positionMode:q,style:M,className:Z,popupClass:d,onOpen:G,onClose:Q,onPosition:$,onKeyDown:J},i&&l?t.createElement(t.Fragment,null,t.createElement("div",{className:f.classNames("k-popover-callout",W)}),t.createElement("div",{className:"k-popover-inner"},z)):z))}),k={callout:!0,position:"top",collision:{horizontal:"none",vertical:"none"}};O.propTypes={callout:e.bool,title:e.node,position:e.oneOf(["top","left","bottom","right"]),show:e.bool,animate:e.oneOfType([e.bool,e.shape({openDuration:e.number,closeDuration:e.number})]),anchor:function(n){const r=n.anchor;return r&&typeof r.nodeType!="number"?new Error("Invalid prop `anchor` supplied to `Kendo React Popover`. Validation failed."):null},appendTo:function(n){const r=n.appendTo;return r&&typeof r.nodeType!="number"?new Error("Invalid prop `appendTo` supplied to `Kendo React Popover`. Validation failed."):null},positionMode:e.oneOf(["fixed","absolute"]),scale:e.number,offset:e.shape({left:e.number,top:e.number}),children:e.oneOfType([e.element,e.node]),className:e.oneOfType([e.string,e.arrayOf(e.string),e.object]),id:e.string,popoverClass:e.oneOfType([e.string,e.arrayOf(e.string),e.object]),style:e.object,onClose:e.func,onPosition:e.func,onOpen:e.func};O.displayName="KendoReactPopover";exports.Popover=O;
|
package/popover/Popover.mjs
CHANGED
|
@@ -7,133 +7,135 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
9
|
import e from "prop-types";
|
|
10
|
-
import { ZIndexContext as
|
|
11
|
-
import { Popup as
|
|
12
|
-
import { PopoverActionsBar as
|
|
13
|
-
import { getFirstFocusableElement as
|
|
14
|
-
const
|
|
10
|
+
import { ZIndexContext as I, useId as W, classNames as Y } from "@progress/kendo-react-common";
|
|
11
|
+
import { Popup as ee } from "@progress/kendo-react-popup";
|
|
12
|
+
import { PopoverActionsBar as z } from "./PopoverActionsBar.mjs";
|
|
13
|
+
import { getFirstFocusableElement as oe, handleFocusTrap as te } from "./utils.mjs";
|
|
14
|
+
const ne = 12e3, re = 2e3, w = 15, le = {
|
|
15
15
|
top: "k-callout-s",
|
|
16
16
|
left: "k-callout-e",
|
|
17
17
|
bottom: "k-callout-n",
|
|
18
18
|
right: "k-callout-w"
|
|
19
|
-
},
|
|
19
|
+
}, ae = {
|
|
20
20
|
top: "k-callout-n",
|
|
21
21
|
left: "k-callout-w",
|
|
22
22
|
bottom: "k-callout-s",
|
|
23
23
|
right: "k-callout-e"
|
|
24
|
-
},
|
|
24
|
+
}, ie = {
|
|
25
25
|
top: { vertical: "bottom", horizontal: "center" },
|
|
26
26
|
left: { vertical: "center", horizontal: "right" },
|
|
27
27
|
bottom: { vertical: "top", horizontal: "center" },
|
|
28
28
|
right: { vertical: "center", horizontal: "left" }
|
|
29
|
-
},
|
|
29
|
+
}, se = {
|
|
30
30
|
top: { vertical: "top", horizontal: "center" },
|
|
31
31
|
left: { vertical: "center", horizontal: "left" },
|
|
32
32
|
bottom: { vertical: "bottom", horizontal: "center" },
|
|
33
33
|
right: { vertical: "center", horizontal: "right" }
|
|
34
|
-
},
|
|
34
|
+
}, ce = (r) => t.Children.toArray(r).filter((n) => n && n.type === z), pe = (r) => t.Children.toArray(r).filter((n) => n && n.type !== z), N = t.forwardRef((r, n) => {
|
|
35
35
|
const {
|
|
36
|
-
autoFocus:
|
|
37
|
-
callout:
|
|
38
|
-
position: l =
|
|
39
|
-
collision:
|
|
40
|
-
title:
|
|
41
|
-
children:
|
|
42
|
-
show:
|
|
43
|
-
anchor:
|
|
44
|
-
appendTo:
|
|
45
|
-
offset:
|
|
46
|
-
animate:
|
|
47
|
-
positionMode:
|
|
48
|
-
scale:
|
|
36
|
+
autoFocus: D = !0,
|
|
37
|
+
callout: u = g.callout,
|
|
38
|
+
position: l = g.position,
|
|
39
|
+
collision: F = g.collision,
|
|
40
|
+
title: c,
|
|
41
|
+
children: d,
|
|
42
|
+
show: R,
|
|
43
|
+
anchor: x,
|
|
44
|
+
appendTo: B,
|
|
45
|
+
offset: K,
|
|
46
|
+
animate: j,
|
|
47
|
+
positionMode: S,
|
|
48
|
+
scale: V,
|
|
49
49
|
popoverClass: a,
|
|
50
|
-
className:
|
|
51
|
-
id:
|
|
52
|
-
style:
|
|
53
|
-
contentStyle:
|
|
54
|
-
onPosition:
|
|
50
|
+
className: Z,
|
|
51
|
+
id: P,
|
|
52
|
+
style: _,
|
|
53
|
+
contentStyle: E,
|
|
54
|
+
onPosition: f,
|
|
55
55
|
onClose: m,
|
|
56
56
|
onOpen: h,
|
|
57
57
|
onKeyDown: v
|
|
58
|
-
} = r, [
|
|
59
|
-
vertical:
|
|
60
|
-
horizontal:
|
|
61
|
-
},
|
|
58
|
+
} = r, [L, k] = t.useState(!1), C = l === "top" || l === "bottom", M = r.margin || {
|
|
59
|
+
vertical: u && C ? w : 0,
|
|
60
|
+
horizontal: u && !C ? w : 0
|
|
61
|
+
}, H = ie[l], U = se[l], O = t.useContext(I), X = O ? O + re : ne, i = t.useRef(null), T = W(P) || "k-popover-1", y = `${T}-header`, b = `${T}-body`;
|
|
62
62
|
t.useImperativeHandle(i, () => ({ props: r })), t.useImperativeHandle(n, () => i.current);
|
|
63
|
-
const
|
|
63
|
+
const $ = t.useCallback(
|
|
64
64
|
(o) => {
|
|
65
|
-
if (setTimeout(() =>
|
|
66
|
-
const
|
|
65
|
+
if (setTimeout(() => k(o.flipped)), f) {
|
|
66
|
+
const s = {
|
|
67
67
|
target: i.current,
|
|
68
68
|
flipped: o.flipped,
|
|
69
69
|
fitted: o.fitted
|
|
70
70
|
};
|
|
71
|
-
|
|
71
|
+
f.call(void 0, s);
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
[
|
|
75
|
-
),
|
|
76
|
-
if (
|
|
77
|
-
const o =
|
|
74
|
+
[f, k]
|
|
75
|
+
), q = t.useCallback(() => {
|
|
76
|
+
if (D) {
|
|
77
|
+
const o = oe(document.querySelector(".k-popover-inner"));
|
|
78
78
|
o && o.focus();
|
|
79
79
|
}
|
|
80
80
|
if (h) {
|
|
81
81
|
const o = { target: i.current };
|
|
82
82
|
h.call(void 0, o);
|
|
83
83
|
}
|
|
84
|
-
}, [h]),
|
|
84
|
+
}, [h]), G = t.useCallback(
|
|
85
85
|
(o) => {
|
|
86
86
|
if (v && o.key === "Escape") {
|
|
87
|
-
const
|
|
88
|
-
v.call(void 0,
|
|
87
|
+
const s = { target: i.current, show: !1 };
|
|
88
|
+
v.call(void 0, s);
|
|
89
89
|
}
|
|
90
|
-
o.key === "Tab" &&
|
|
90
|
+
o.key === "Tab" && te(o);
|
|
91
91
|
},
|
|
92
92
|
[v]
|
|
93
|
-
),
|
|
93
|
+
), J = t.useCallback(
|
|
94
94
|
(o) => {
|
|
95
95
|
if (m) {
|
|
96
|
-
const
|
|
97
|
-
m.call(void 0,
|
|
96
|
+
const s = { target: i.current };
|
|
97
|
+
m.call(void 0, s);
|
|
98
98
|
}
|
|
99
99
|
o && o.target && o.target.props && o.target.props.anchor && o.target.props.anchor.focus();
|
|
100
100
|
},
|
|
101
101
|
[m]
|
|
102
|
-
),
|
|
103
|
-
Array.isArray(a) ? a.forEach((o) =>
|
|
104
|
-
|
|
105
|
-
}) : a && (
|
|
106
|
-
const
|
|
107
|
-
() => /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
108
|
-
[
|
|
102
|
+
), p = { "k-popover": !0 };
|
|
103
|
+
Array.isArray(a) ? a.forEach((o) => p[o] = !0) : typeof a == "object" ? Object.keys(a).forEach((o) => {
|
|
104
|
+
p[o] = a[o];
|
|
105
|
+
}) : a && (p[a] = !0);
|
|
106
|
+
const Q = L ? ae[l] : le[l], A = t.useMemo(
|
|
107
|
+
() => /* @__PURE__ */ t.createElement(t.Fragment, null, c && /* @__PURE__ */ t.createElement("div", { className: "k-popover-header", id: y }, c), /* @__PURE__ */ t.createElement("div", { className: "k-popover-body", id: b, style: E }, pe(d)), ce(d)),
|
|
108
|
+
[d, E, c, y, b]
|
|
109
109
|
);
|
|
110
|
-
return /* @__PURE__ */ t.createElement(
|
|
111
|
-
|
|
110
|
+
return /* @__PURE__ */ t.createElement(I.Provider, { value: X }, /* @__PURE__ */ t.createElement(
|
|
111
|
+
ee,
|
|
112
112
|
{
|
|
113
|
-
id:
|
|
114
|
-
role: "
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
113
|
+
id: P,
|
|
114
|
+
role: "dialog",
|
|
115
|
+
ariaLabelledBy: c ? y : void 0,
|
|
116
|
+
ariaDescribedBy: b,
|
|
117
|
+
animate: j,
|
|
118
|
+
collision: F,
|
|
119
|
+
anchor: x,
|
|
120
|
+
offset: K,
|
|
121
|
+
margin: M,
|
|
122
|
+
popupAlign: H,
|
|
123
|
+
anchorAlign: U,
|
|
124
|
+
appendTo: B,
|
|
125
|
+
show: R,
|
|
126
|
+
scale: V,
|
|
127
|
+
positionMode: S,
|
|
128
|
+
style: _,
|
|
129
|
+
className: Z,
|
|
130
|
+
popupClass: p,
|
|
131
|
+
onOpen: q,
|
|
132
|
+
onClose: J,
|
|
133
|
+
onPosition: $,
|
|
134
|
+
onKeyDown: G
|
|
133
135
|
},
|
|
134
|
-
|
|
136
|
+
u && l ? /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", { className: Y("k-popover-callout", Q) }), /* @__PURE__ */ t.createElement("div", { className: "k-popover-inner" }, A)) : A
|
|
135
137
|
));
|
|
136
|
-
}),
|
|
138
|
+
}), g = {
|
|
137
139
|
callout: !0,
|
|
138
140
|
position: "top",
|
|
139
141
|
collision: {
|
|
@@ -141,7 +143,7 @@ const $ = 12e3, ee = 2e3, O = 15, oe = {
|
|
|
141
143
|
vertical: "none"
|
|
142
144
|
}
|
|
143
145
|
};
|
|
144
|
-
|
|
146
|
+
N.propTypes = {
|
|
145
147
|
callout: e.bool,
|
|
146
148
|
title: e.node,
|
|
147
149
|
position: e.oneOf(["top", "left", "bottom", "right"]),
|
|
@@ -176,7 +178,7 @@ A.propTypes = {
|
|
|
176
178
|
onPosition: e.func,
|
|
177
179
|
onOpen: e.func
|
|
178
180
|
};
|
|
179
|
-
|
|
181
|
+
N.displayName = "KendoReactPopover";
|
|
180
182
|
export {
|
|
181
|
-
|
|
183
|
+
N as Popover
|
|
182
184
|
};
|