@progress/kendo-react-tooltip 12.0.3-develop.2 → 12.1.0-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-tooltip.js +1 -1
- package/index.d.mts +12 -2
- package/index.d.ts +12 -2
- package/package.json +3 -3
- package/popover/Popover.js +1 -1
- package/popover/Popover.mjs +70 -66
|
@@ -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(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(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"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).KendoReactTooltip={},t.React,t.ReactDOM,t.PropTypes,t.KendoReactCommon,t.KendoReactPopup)}(this,(function(t,e,o,n,i,l){"use strict";function s(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,n.get?n:{enumerable:!0,get:function(){return t[o]}})}})),e.default=t,Object.freeze(e)}var r=s(e),a=s(o);const p=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],c=t=>{if(null===t)return!1;let e=t;for(;e;){if(null!==e&&e.classList&&e.classList.contains("k-tooltip"))return!0;e=null!==e.parentNode&&e.parentNode}return p.filter((e=>e===t.className)).length>0},h=class t extends r.PureComponent{constructor(){super(...arguments),this.context=0,this.state={targetElement:null,open:!1,title:""},this.top=0,this.left=0,this.willOpen=!1,this.handleMouseOut=t=>{const{targetElement:e}=this.state,o=e?e.ownerDocument:document,n=o&&o.elementFromPoint(t.clientX,t.clientY);c(n)||this.props.open||(clearInterval(this.updateIntervalId),this.willOpen=!1,this.onClose(t))},this.compareTargets=t=>this.state.targetElement===t.nativeEvent.target,this.handleEscape=t=>{const e=this.compareTargets(t);this.state.open&&e&&this.onClose(t)},this.handleTargetItemClick=t=>{const e=this.compareTargets(t);this.state.open&&e?this.onClose(t):this.showToolTip(t)},this.handleKeyDown=(t,e)=>{const o=t.key;"Escape"===t.key?this.handleEscape(t):e.includes(o)&&this.handleMouseOver(t)},this.handleMouseOver=t=>{const e=t.target;!this.isVisible(e)||c(e)||e===this.state.targetElement||this.showToolTip(t)},this.handleBodyMousemove=t=>{this.top=t.clientY,this.left=t.clientX},this.onClose=t=>{i.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&&(null===t.parentElement?this.onClose({target:t}):this.showToolTip({target:t}))},this.position=t=>{const e=null!==(i=this.state.targetElement)?i.getBoundingClientRect():document.body.getBoundingClientRect(),o=((t,e,o,n,i)=>{switch(i){case"bottom":case"top":return"pointer"===n?t-e/2:o.left-e/2+o.width/2;case"left":return"pointer"===n?t-e-10:o.left-e-10;case"right":return"pointer"===n?t+10:o.right+10;default:return"pointer"===n?t<window.screen.availWidth/2?t-10:t-e+10:t<window.screen.availWidth/2?o.left:o.right-e}})(this.left,t.offsetWidth,e,this.props.anchorElement,this.props.position),n=((t,e,o,n,i)=>{switch(i){case"bottom":return"pointer"===n?t+10:e.bottom+10;case"left":case"right":return"pointer"===n?t-o/2:e.top-o/2+e.height/2;case"top":return"pointer"===n?t-o-10:e.top-o-10;default:return"pointer"===n?t<window.innerHeight/2?t+10:t-o-10:t<window.innerHeight/2?e.bottom+10:e.top-o-10}})(this.top,e,t.offsetHeight,this.props.anchorElement,this.props.position);var i;return{left:o,top:n}},this.getTitle=t=>{for(;t;){if(null!==t.getAttribute("title")||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:100}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:e,showOption:o,...n}=this.props;let i=null;const l=void 0===(null==o?void 0:o.hover)||(null==o?void 0:o.hover),s=void 0!==(null==o?void 0:o.click)&&(null==o?void 0:o.click),a=void 0!==(null==o?void 0:o.focus)&&(null==o?void 0:o.focus),p=void 0!==(null==o?void 0:o.none)&&(null==o?void 0:o.none),c=(void 0!==(null==o?void 0:o.keys)?null==o?void 0:o.keys:[]).map((t=>"Space"===t?" ":t));return r.createElement("div",{onMouseOver:t=>{i&&!p&&l&&i.handleMouseOver(t)},onMouseOut:t=>{i&&!p&&l&&i.handleMouseOut(t)},onClick:t=>{i&&!p&&s&&i.handleTargetItemClick(t)},onFocus:t=>{i&&!p&&a&&i.handleMouseOver(t)},onKeyDown:t=>{(i&&!p&&c.length>0||i&&!p&&"Escape"===t.key)&&i.handleKeyDown(t,c)}},r.createElement(t,{ref:t=>{i=t},...n}),e)}if(!1===this.props.open)return null;const{targetElement:e}=this.state,o=this.getCurrentZIndex();return e&&this.state.title&&e.ownerDocument&&a.createPortal(r.createElement("div",{ref:t=>{if(!t)return;let e;if(this.props.onPosition){const o={element:t,targetElement:this.state.targetElement,mouseTop:this.top,mouseLeft:this.left,anchorElement:this.props.anchorElement,position:this.props.position,target:this,syntheticEvent:null,nativeEvent:null};e=this.props.onPosition.call(void 0,o)}else e=this.position(t);t.style.left=e.left+"px",t.style.top=e.top+"px"},className:i.classNames("k-animation-container","k-animation-container-fixed","k-animation-container-shown",this.props.className),style:{zIndex:o,...this.props.style},tabIndex:0},r.createElement("div",{className:"k-child-animation-container"},r.createElement("div",{id:this.props.id,role:"tooltip",className:i.classNames("k-tooltip",this.props.tooltipClassName),style:{position:"relative",...this.props.tooltipStyle}},r.createElement("div",{className:"k-tooltip-content"},this.props.content&&r.createElement(this.props.content,{title:this.state.title,target:this.state.targetElement})||this.state.title),this.props.showCallout&&r.createElement("div",{ref:t=>{t&&(t.className=this.calloutClassName(),"auto"===this.props.position&&(this.left<window.screen.availWidth/2?t.style.left=this.props.setCalloutOnPositionAuto||"25%":t.style.left=this.props.setCalloutOnPositionAuto||"75%"))}})))),this.props.appendTo?this.props.appendTo:e.ownerDocument.body)}showToolTip(t){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),t.target.hasChildNodes()&&t.target.childNodes.forEach((e=>{"title"===e.nodeName&&(t.target.titleExpando=e.innerHTML,e.remove())}));const e=this.props.targetElement||t.target,o=this.getTitle(e);o.title?(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:e,open:!0,title:o.title},this.setUpdateInterval)}),this.props.openDelay):this.setState({targetElement:e,open:!0,title:o.title},this.setUpdateInterval),this.state.title!==o.title&&i.dispatchEvent(this.props.onOpen,t,this,void 0)):this.state.open&&this.onClose(t)}isVisible(t){return!this.props.filter||this.props.filter(t)}};h.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,showOption:n.object},h.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1},h.contextType=i.ZIndexContext;let u=h;const d=r.forwardRef(((t,e)=>{const o=r.useRef(null),n=r.useRef(null),{alignment:l=m.alignment,orientation:s=m.orientation}=t;return r.useImperativeHandle(n,(()=>({props:t,element:o.current}))),r.useImperativeHandle(e,(()=>n.current)),r.createElement("div",{ref:o,className:i.classNames("k-popover-actions","k-actions",{[`k-actions-${l}`]:l,[`k-actions-${s}`]:s})},t.children)})),m={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.displayName="KendoReactPopoverActionsBar";const f=t=>{if(t){const e=t.querySelectorAll(i.FOCUSABLE_ELEMENTS.join(", "));if(e.length)return e[0]}},v=t=>{const e=f(document.querySelector(".k-popover-inner")),o=(t=>{if(t){const e=t.querySelectorAll(i.FOCUSABLE_ELEMENTS.join(", "));if(e.length)return e[e.length-1]}})(document.querySelector(".k-popover-inner"));t.shiftKey&&t.target===e?(o&&o.focus(),t.preventDefault()):!t.shiftKey&&t.target===o&&(e&&e.focus(),t.preventDefault())},g={top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"},y={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"}},k={top:{vertical:"top",horizontal:"center"},left:{vertical:"center",horizontal:"left"},bottom:{vertical:"bottom",horizontal:"center"},right:{vertical:"center",horizontal:"right"}},b=t=>r.Children.toArray(t).filter((t=>t&&t.type===d)),T=t=>r.Children.toArray(t).filter((t=>t&&t.type!==d)),w=r.forwardRef(((t,e)=>{const{callout:o=O.callout,position:n=O.position,collision:s=O.collision,title:a,children:p,show:c,anchor:h,appendTo:u,offset:d,animate:m,positionMode:w,scale:C,popoverClass:I,className:N,id:x,style:P,contentStyle:D,onPosition:M,onClose:A,onOpen:R,onKeyDown:S}=t,[j,z]=r.useState(!1),K="top"===n||"bottom"===n,q=t.margin||{vertical:o&&K?15:0,horizontal:o&&!K?15:0},L=E[n],B=k[n],H=r.useContext(i.ZIndexContext),U=H?H+2e3:12e3,F=r.useRef(null);r.useImperativeHandle(F,(()=>({props:t}))),r.useImperativeHandle(e,(()=>F.current));const W=r.useCallback((t=>{if(setTimeout((()=>z(t.flipped))),M){const e={target:F.current,flipped:t.flipped,fitted:t.fitted};M.call(void 0,e)}}),[M,z]),Z=r.useCallback((()=>{const t=f(document.querySelector(".k-popover-inner"));if(t&&t.focus(),R){const t={target:F.current};R.call(void 0,t)}}),[R]),V=r.useCallback((t=>{if(S&&"Escape"===t.key){const t={target:F.current,show:!1};S.call(void 0,t)}"Tab"===t.key&&v(t)}),[S]),X=r.useCallback((t=>{if(A){const t={target:F.current};A.call(void 0,t)}t&&t.target&&t.target.props&&t.target.props.anchor&&t.target.props.anchor.focus()}),[A]),Y={"k-popover":!0};Array.isArray(I)?I.forEach((t=>Y[t]=!0)):"object"==typeof I?Object.keys(I).forEach((t=>{Y[t]=I[t]})):I&&(Y[I]=!0);const $=j?y[n]:g[n],_=r.useMemo((()=>r.createElement(r.Fragment,null,a&&r.createElement("div",{className:"k-popover-header"},a),r.createElement("div",{className:"k-popover-body",style:D},T(p)),b(p))),[p,D,a]);return r.createElement(i.ZIndexContext.Provider,{value:U},r.createElement(l.Popup,{id:x,role:"tooltip",animate:m,collision:s,anchor:h,offset:d,margin:q,popupAlign:L,anchorAlign:B,appendTo:u,show:c,scale:C,positionMode:w,style:P,className:N,popupClass:Y,onOpen:Z,onClose:X,onPosition:W,onKeyDown:V},o&&n?r.createElement(r.Fragment,null,r.createElement("div",{className:i.classNames("k-popover-callout",$)}),r.createElement("div",{className:"k-popover-inner"},_)):_))})),O={callout:!0,position:"top",collision:{horizontal:"none",vertical:"none"}};w.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(t){const e=t.anchor;return e&&"number"!=typeof e.nodeType?new Error("Invalid prop `anchor` supplied to `Kendo React Popover`. Validation failed."):null},appendTo:function(t){const e=t.appendTo;return e&&"number"!=typeof e.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},w.displayName="KendoReactPopover",t.Popover=w,t.PopoverActionsBar=d,t.Tooltip=u}));
|
|
15
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(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"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).KendoReactTooltip={},t.React,t.ReactDOM,t.PropTypes,t.KendoReactCommon,t.KendoReactPopup)}(this,(function(t,e,o,n,i,l){"use strict";function s(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,n.get?n:{enumerable:!0,get:function(){return t[o]}})}})),e.default=t,Object.freeze(e)}var r=s(e),a=s(o);const p=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],c=t=>{if(null===t)return!1;let e=t;for(;e;){if(null!==e&&e.classList&&e.classList.contains("k-tooltip"))return!0;e=null!==e.parentNode&&e.parentNode}return p.filter((e=>e===t.className)).length>0},u=class t extends r.PureComponent{constructor(){super(...arguments),this.context=0,this.state={targetElement:null,open:!1,title:""},this.top=0,this.left=0,this.willOpen=!1,this.handleMouseOut=t=>{const{targetElement:e}=this.state,o=e?e.ownerDocument:document,n=o&&o.elementFromPoint(t.clientX,t.clientY);c(n)||this.props.open||(clearInterval(this.updateIntervalId),this.willOpen=!1,this.onClose(t))},this.compareTargets=t=>this.state.targetElement===t.nativeEvent.target,this.handleEscape=t=>{const e=this.compareTargets(t);this.state.open&&e&&this.onClose(t)},this.handleTargetItemClick=t=>{const e=this.compareTargets(t);this.state.open&&e?this.onClose(t):this.showToolTip(t)},this.handleKeyDown=(t,e)=>{const o=t.key;"Escape"===t.key?this.handleEscape(t):e.includes(o)&&this.handleMouseOver(t)},this.handleMouseOver=t=>{const e=t.target;!this.isVisible(e)||c(e)||e===this.state.targetElement||this.showToolTip(t)},this.handleBodyMousemove=t=>{this.top=t.clientY,this.left=t.clientX},this.onClose=t=>{i.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&&(null===t.parentElement?this.onClose({target:t}):this.showToolTip({target:t}))},this.position=t=>{const e=null!==(i=this.state.targetElement)?i.getBoundingClientRect():document.body.getBoundingClientRect(),o=((t,e,o,n,i)=>{switch(i){case"bottom":case"top":return"pointer"===n?t-e/2:o.left-e/2+o.width/2;case"left":return"pointer"===n?t-e-10:o.left-e-10;case"right":return"pointer"===n?t+10:o.right+10;default:return"pointer"===n?t<window.screen.availWidth/2?t-10:t-e+10:t<window.screen.availWidth/2?o.left:o.right-e}})(this.left,t.offsetWidth,e,this.props.anchorElement,this.props.position),n=((t,e,o,n,i)=>{switch(i){case"bottom":return"pointer"===n?t+10:e.bottom+10;case"left":case"right":return"pointer"===n?t-o/2:e.top-o/2+e.height/2;case"top":return"pointer"===n?t-o-10:e.top-o-10;default:return"pointer"===n?t<window.innerHeight/2?t+10:t-o-10:t<window.innerHeight/2?e.bottom+10:e.top-o-10}})(this.top,e,t.offsetHeight,this.props.anchorElement,this.props.position);var i;return{left:o,top:n}},this.getTitle=t=>{for(;t;){if(null!==t.getAttribute("title")||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:100}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:e,showOption:o,...n}=this.props;let i=null;const l=void 0===(null==o?void 0:o.hover)||(null==o?void 0:o.hover),s=void 0!==(null==o?void 0:o.click)&&(null==o?void 0:o.click),a=void 0!==(null==o?void 0:o.focus)&&(null==o?void 0:o.focus),p=void 0!==(null==o?void 0:o.none)&&(null==o?void 0:o.none),c=(void 0!==(null==o?void 0:o.keys)?null==o?void 0:o.keys:[]).map((t=>"Space"===t?" ":t));return r.createElement("div",{onMouseOver:t=>{i&&!p&&l&&i.handleMouseOver(t)},onMouseOut:t=>{i&&!p&&l&&i.handleMouseOut(t)},onClick:t=>{i&&!p&&s&&i.handleTargetItemClick(t)},onFocus:t=>{i&&!p&&a&&i.handleMouseOver(t)},onKeyDown:t=>{(i&&!p&&c.length>0||i&&!p&&"Escape"===t.key)&&i.handleKeyDown(t,c)}},r.createElement(t,{ref:t=>{i=t},...n}),e)}if(!1===this.props.open)return null;const{targetElement:e}=this.state,o=this.getCurrentZIndex();return e&&this.state.title&&e.ownerDocument&&a.createPortal(r.createElement("div",{ref:t=>{if(!t)return;let e;if(this.props.onPosition){const o={element:t,targetElement:this.state.targetElement,mouseTop:this.top,mouseLeft:this.left,anchorElement:this.props.anchorElement,position:this.props.position,target:this,syntheticEvent:null,nativeEvent:null};e=this.props.onPosition.call(void 0,o)}else e=this.position(t);t.style.left=e.left+"px",t.style.top=e.top+"px"},className:i.classNames("k-animation-container","k-animation-container-fixed","k-animation-container-shown",this.props.className),style:{zIndex:o,...this.props.style},tabIndex:0},r.createElement("div",{className:"k-child-animation-container"},r.createElement("div",{id:this.props.id,role:"tooltip",className:i.classNames("k-tooltip",this.props.tooltipClassName),style:{position:"relative",...this.props.tooltipStyle}},r.createElement("div",{className:"k-tooltip-content"},this.props.content&&r.createElement(this.props.content,{title:this.state.title,target:this.state.targetElement})||this.state.title),this.props.showCallout&&r.createElement("div",{ref:t=>{t&&(t.className=this.calloutClassName(),"auto"===this.props.position&&(this.left<window.screen.availWidth/2?t.style.left=this.props.setCalloutOnPositionAuto||"25%":t.style.left=this.props.setCalloutOnPositionAuto||"75%"))}})))),this.props.appendTo?this.props.appendTo:e.ownerDocument.body)}showToolTip(t){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),t.target.hasChildNodes()&&t.target.childNodes.forEach((e=>{"title"===e.nodeName&&(t.target.titleExpando=e.innerHTML,e.remove())}));const e=this.props.targetElement||t.target,o=this.getTitle(e);o.title?(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:e,open:!0,title:o.title},this.setUpdateInterval)}),this.props.openDelay):this.setState({targetElement:e,open:!0,title:o.title},this.setUpdateInterval),this.state.title!==o.title&&i.dispatchEvent(this.props.onOpen,t,this,void 0)):this.state.open&&this.onClose(t)}isVisible(t){return!this.props.filter||this.props.filter(t)}};u.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,showOption:n.object},u.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1},u.contextType=i.ZIndexContext;let h=u;const d=r.forwardRef(((t,e)=>{const o=r.useRef(null),n=r.useRef(null),{alignment:l=m.alignment,orientation:s=m.orientation}=t;return r.useImperativeHandle(n,(()=>({props:t,element:o.current}))),r.useImperativeHandle(e,(()=>n.current)),r.createElement("div",{ref:o,className:i.classNames("k-popover-actions","k-actions",{[`k-actions-${l}`]:l,[`k-actions-${s}`]:s})},t.children)})),m={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.displayName="KendoReactPopoverActionsBar";const f=t=>{if(t){const e=t.querySelectorAll(i.FOCUSABLE_ELEMENTS.join(", "));if(e.length)return e[0]}},v=t=>{const e=f(document.querySelector(".k-popover-inner")),o=(t=>{if(t){const e=t.querySelectorAll(i.FOCUSABLE_ELEMENTS.join(", "));if(e.length)return e[e.length-1]}})(document.querySelector(".k-popover-inner"));t.shiftKey&&t.target===e?(o&&o.focus(),t.preventDefault()):!t.shiftKey&&t.target===o&&(e&&e.focus(),t.preventDefault())},g={top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"},y={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"}},k={top:{vertical:"top",horizontal:"center"},left:{vertical:"center",horizontal:"left"},bottom:{vertical:"bottom",horizontal:"center"},right:{vertical:"center",horizontal:"right"}},b=r.forwardRef(((t,e)=>{const{autoFocus:o=!0,callout:n=T.callout,position:s=T.position,collision:a=T.collision,title:p,children:c,show:u,anchor:h,appendTo:m,offset:b,animate:w,positionMode:O,scale:C,popoverClass:I,className:N,id:x,style:P,contentStyle:D,onPosition:M,onClose:A,onOpen:R,onKeyDown:S}=t,[j,z]=r.useState(!1),K="top"===s||"bottom"===s,q=t.margin||{vertical:n&&K?15:0,horizontal:n&&!K?15:0},L=E[s],B=k[s],H=r.useContext(i.ZIndexContext),U=H?H+2e3:12e3,F=r.useRef(null);r.useImperativeHandle(F,(()=>({props:t}))),r.useImperativeHandle(e,(()=>F.current));const W=r.useCallback((t=>{if(setTimeout((()=>z(t.flipped))),M){const e={target:F.current,flipped:t.flipped,fitted:t.fitted};M.call(void 0,e)}}),[M,z]),Z=r.useCallback((()=>{if(o){const t=f(document.querySelector(".k-popover-inner"));t&&t.focus()}if(R){const t={target:F.current};R.call(void 0,t)}}),[R]),V=r.useCallback((t=>{if(S&&"Escape"===t.key){const t={target:F.current,show:!1};S.call(void 0,t)}"Tab"===t.key&&v(t)}),[S]),X=r.useCallback((t=>{if(A){const t={target:F.current};A.call(void 0,t)}t&&t.target&&t.target.props&&t.target.props.anchor&&t.target.props.anchor.focus()}),[A]),Y={"k-popover":!0};Array.isArray(I)?I.forEach((t=>Y[t]=!0)):"object"==typeof I?Object.keys(I).forEach((t=>{Y[t]=I[t]})):I&&(Y[I]=!0);const $=j?y[s]:g[s],_=r.useMemo((()=>r.createElement(r.Fragment,null,p&&r.createElement("div",{className:"k-popover-header"},p),r.createElement("div",{className:"k-popover-body",style:D},(t=>r.Children.toArray(t).filter((t=>t&&t.type!==d)))(c)),(t=>r.Children.toArray(t).filter((t=>t&&t.type===d)))(c))),[c,D,p]);return r.createElement(i.ZIndexContext.Provider,{value:U},r.createElement(l.Popup,{id:x,role:"tooltip",animate:w,collision:a,anchor:h,offset:b,margin:q,popupAlign:L,anchorAlign:B,appendTo:m,show:u,scale:C,positionMode:O,style:P,className:N,popupClass:Y,onOpen:Z,onClose:X,onPosition:W,onKeyDown:V},n&&s?r.createElement(r.Fragment,null,r.createElement("div",{className:i.classNames("k-popover-callout",$)}),r.createElement("div",{className:"k-popover-inner"},_)):_))})),T={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(t){const e=t.anchor;return e&&"number"!=typeof e.nodeType?new Error("Invalid prop `anchor` supplied to `Kendo React Popover`. Validation failed."):null},appendTo:function(t){const e=t.appendTo;return e&&"number"!=typeof e.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},b.displayName="KendoReactPopover",t.Popover=b,t.PopoverActionsBar=d,t.Tooltip=h}));
|
package/index.d.mts
CHANGED
|
@@ -72,8 +72,7 @@ export declare interface PopoverActionsBarProps {
|
|
|
72
72
|
/**
|
|
73
73
|
* The animation settings of the Popover.
|
|
74
74
|
*/
|
|
75
|
-
export declare
|
|
76
|
-
}
|
|
75
|
+
export declare type PopoverAnimation = PopupAnimation;
|
|
77
76
|
|
|
78
77
|
/**
|
|
79
78
|
* Represents the object of the `Close` Popover event.
|
|
@@ -205,6 +204,17 @@ export declare interface PopoverPositionEvent {
|
|
|
205
204
|
export declare type PopoverPositionMode = PositionMode;
|
|
206
205
|
|
|
207
206
|
export declare interface PopoverProps {
|
|
207
|
+
/**
|
|
208
|
+
* Set the focus the Popover container automatically when mounted.
|
|
209
|
+
*
|
|
210
|
+
* @default true
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```jsx
|
|
214
|
+
* <Popover autoFocus={false} />
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
autoFocus?: boolean;
|
|
208
218
|
/**
|
|
209
219
|
* Specifies the title of the Popover component.
|
|
210
220
|
* Can be a string or JSX content.
|
package/index.d.ts
CHANGED
|
@@ -72,8 +72,7 @@ export declare interface PopoverActionsBarProps {
|
|
|
72
72
|
/**
|
|
73
73
|
* The animation settings of the Popover.
|
|
74
74
|
*/
|
|
75
|
-
export declare
|
|
76
|
-
}
|
|
75
|
+
export declare type PopoverAnimation = PopupAnimation;
|
|
77
76
|
|
|
78
77
|
/**
|
|
79
78
|
* Represents the object of the `Close` Popover event.
|
|
@@ -205,6 +204,17 @@ export declare interface PopoverPositionEvent {
|
|
|
205
204
|
export declare type PopoverPositionMode = PositionMode;
|
|
206
205
|
|
|
207
206
|
export declare interface PopoverProps {
|
|
207
|
+
/**
|
|
208
|
+
* Set the focus the Popover container automatically when mounted.
|
|
209
|
+
*
|
|
210
|
+
* @default true
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```jsx
|
|
214
|
+
* <Popover autoFocus={false} />
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
autoFocus?: boolean;
|
|
208
218
|
/**
|
|
209
219
|
* Specifies the title of the Popover component.
|
|
210
220
|
* Can be a string or JSX content.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-tooltip",
|
|
3
|
-
"version": "12.0
|
|
3
|
+
"version": "12.1.0-develop.2",
|
|
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.0",
|
|
29
|
-
"@progress/kendo-react-common": "12.0
|
|
30
|
-
"@progress/kendo-react-popup": "12.0
|
|
29
|
+
"@progress/kendo-react-common": "12.1.0-develop.2",
|
|
30
|
+
"@progress/kendo-react-popup": "12.1.0-develop.2",
|
|
31
31
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
32
32
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
33
33
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
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 Q=require("react"),e=require("prop-types"),g=require("@progress/kendo-react-common"),W=require("@progress/kendo-react-popup"),z=require("./PopoverActionsBar.js"),A=require("./utils.js");function Y(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=Y(Q),$=12e3,ee=2e3,w=15,oe={top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"},te={top:"k-callout-n",left:"k-callout-w",bottom:"k-callout-s",right:"k-callout-e"},ne={top:{vertical:"bottom",horizontal:"center"},left:{vertical:"center",horizontal:"right"},bottom:{vertical:"top",horizontal:"center"},right:{vertical:"center",horizontal:"left"}},re={top:{vertical:"top",horizontal:"center"},left:{vertical:"center",horizontal:"left"},bottom:{vertical:"bottom",horizontal:"center"},right:{vertical:"center",horizontal:"right"}},le=n=>t.Children.toArray(n).filter(r=>r&&r.type===z.PopoverActionsBar),ae=n=>t.Children.toArray(n).filter(r=>r&&r.type!==z.PopoverActionsBar),P=t.forwardRef((n,r)=>{const{autoFocus:c=!0,callout:i=y.callout,position:l=y.position,collision:R=y.collision,title:f,children:d,show:N,anchor:j,appendTo:D,offset:x,animate:F,positionMode:I,scale:S,popoverClass:a,className:_,id:q,style:B,contentStyle:O,onPosition:m,onClose:v,onOpen:h,onKeyDown:b}=n,[K,k]=t.useState(!1),C=l==="top"||l==="bottom",Z=n.margin||{vertical:i&&C?w:0,horizontal:i&&!C?w:0},M=ne[l],V=re[l],E=t.useContext(g.ZIndexContext),L=E?E+ee:$,s=t.useRef(null);t.useImperativeHandle(s,()=>({props:n})),t.useImperativeHandle(r,()=>s.current);const H=t.useCallback(o=>{if(setTimeout(()=>k(o.flipped)),m){const p={target:s.current,flipped:o.flipped,fitted:o.fitted};m.call(void 0,p)}},[m,k]),U=t.useCallback(()=>{if(c){const o=A.getFirstFocusableElement(document.querySelector(".k-popover-inner"));o&&o.focus()}if(h){const o={target:s.current};h.call(void 0,o)}},[h]),X=t.useCallback(o=>{if(b&&o.key==="Escape"){const p={target:s.current,show:!1};b.call(void 0,p)}o.key==="Tab"&&A.handleFocusTrap(o)},[b]),G=t.useCallback(o=>{if(v){const p={target:s.current};v.call(void 0,p)}o&&o.target&&o.target.props&&o.target.props.anchor&&o.target.props.anchor.focus()},[v]),u={"k-popover":!0};Array.isArray(a)?a.forEach(o=>u[o]=!0):typeof a=="object"?Object.keys(a).forEach(o=>{u[o]=a[o]}):a&&(u[a]=!0);const J=K?te[l]:oe[l],T=t.useMemo(()=>t.createElement(t.Fragment,null,f&&t.createElement("div",{className:"k-popover-header"},f),t.createElement("div",{className:"k-popover-body",style:O},ae(d)),le(d)),[d,O,f]);return t.createElement(g.ZIndexContext.Provider,{value:L},t.createElement(W.Popup,{id:q,role:"tooltip",animate:F,collision:R,anchor:j,offset:x,margin:Z,popupAlign:M,anchorAlign:V,appendTo:D,show:N,scale:S,positionMode:I,style:B,className:_,popupClass:u,onOpen:U,onClose:G,onPosition:H,onKeyDown:X},i&&l?t.createElement(t.Fragment,null,t.createElement("div",{className:g.classNames("k-popover-callout",J)}),t.createElement("div",{className:"k-popover-inner"},T)):T))}),y={callout:!0,position:"top",collision:{horizontal:"none",vertical:"none"}};P.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};P.displayName="KendoReactPopover";exports.Popover=P;
|
package/popover/Popover.mjs
CHANGED
|
@@ -5,129 +5,133 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as t from "react";
|
|
9
9
|
import e from "prop-types";
|
|
10
|
-
import { ZIndexContext as k, classNames as
|
|
11
|
-
import { Popup as
|
|
10
|
+
import { ZIndexContext as k, classNames as J } from "@progress/kendo-react-common";
|
|
11
|
+
import { Popup as Q } from "@progress/kendo-react-popup";
|
|
12
12
|
import { PopoverActionsBar as T } from "./PopoverActionsBar.mjs";
|
|
13
|
-
import { getFirstFocusableElement as
|
|
14
|
-
const
|
|
13
|
+
import { getFirstFocusableElement as W, handleFocusTrap as Y } from "./utils.mjs";
|
|
14
|
+
const $ = 12e3, ee = 2e3, O = 15, oe = {
|
|
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
|
+
}, te = {
|
|
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
|
+
}, ne = {
|
|
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
|
+
}, re = {
|
|
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
|
+
}, le = (r) => t.Children.toArray(r).filter((n) => n && n.type === T), ae = (r) => t.Children.toArray(r).filter((n) => n && n.type !== T), A = t.forwardRef((r, n) => {
|
|
35
35
|
const {
|
|
36
|
+
autoFocus: w = !0,
|
|
36
37
|
callout: p = y.callout,
|
|
37
38
|
position: l = y.position,
|
|
38
|
-
collision:
|
|
39
|
+
collision: z = y.collision,
|
|
39
40
|
title: u,
|
|
40
41
|
children: f,
|
|
41
|
-
show:
|
|
42
|
-
anchor:
|
|
42
|
+
show: N,
|
|
43
|
+
anchor: F,
|
|
43
44
|
appendTo: R,
|
|
44
45
|
offset: x,
|
|
45
46
|
animate: D,
|
|
46
|
-
positionMode:
|
|
47
|
-
scale:
|
|
47
|
+
positionMode: I,
|
|
48
|
+
scale: K,
|
|
48
49
|
popoverClass: a,
|
|
49
|
-
className:
|
|
50
|
-
id:
|
|
51
|
-
style:
|
|
50
|
+
className: j,
|
|
51
|
+
id: S,
|
|
52
|
+
style: V,
|
|
52
53
|
contentStyle: b,
|
|
53
54
|
onPosition: d,
|
|
54
55
|
onClose: m,
|
|
55
56
|
onOpen: h,
|
|
56
57
|
onKeyDown: v
|
|
57
|
-
} = r, [
|
|
58
|
+
} = r, [Z, g] = t.useState(!1), P = l === "top" || l === "bottom", _ = r.margin || {
|
|
58
59
|
vertical: p && P ? O : 0,
|
|
59
60
|
horizontal: p && !P ? O : 0
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
(
|
|
64
|
-
if (setTimeout(() => g(
|
|
65
|
-
const
|
|
66
|
-
target:
|
|
67
|
-
flipped:
|
|
68
|
-
fitted:
|
|
61
|
+
}, B = ne[l], L = re[l], E = t.useContext(k), M = E ? E + ee : $, i = t.useRef(null);
|
|
62
|
+
t.useImperativeHandle(i, () => ({ props: r })), t.useImperativeHandle(n, () => i.current);
|
|
63
|
+
const H = t.useCallback(
|
|
64
|
+
(o) => {
|
|
65
|
+
if (setTimeout(() => g(o.flipped)), d) {
|
|
66
|
+
const c = {
|
|
67
|
+
target: i.current,
|
|
68
|
+
flipped: o.flipped,
|
|
69
|
+
fitted: o.fitted
|
|
69
70
|
};
|
|
70
|
-
d.call(void 0,
|
|
71
|
+
d.call(void 0, c);
|
|
71
72
|
}
|
|
72
73
|
},
|
|
73
74
|
[d, g]
|
|
74
|
-
),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
), U = t.useCallback(() => {
|
|
76
|
+
if (w) {
|
|
77
|
+
const o = W(document.querySelector(".k-popover-inner"));
|
|
78
|
+
o && o.focus();
|
|
79
|
+
}
|
|
80
|
+
if (h) {
|
|
81
|
+
const o = { target: i.current };
|
|
82
|
+
h.call(void 0, o);
|
|
79
83
|
}
|
|
80
|
-
}, [h]),
|
|
81
|
-
(
|
|
82
|
-
if (v &&
|
|
83
|
-
const
|
|
84
|
-
v.call(void 0,
|
|
84
|
+
}, [h]), X = t.useCallback(
|
|
85
|
+
(o) => {
|
|
86
|
+
if (v && o.key === "Escape") {
|
|
87
|
+
const c = { target: i.current, show: !1 };
|
|
88
|
+
v.call(void 0, c);
|
|
85
89
|
}
|
|
86
|
-
|
|
90
|
+
o.key === "Tab" && Y(o);
|
|
87
91
|
},
|
|
88
92
|
[v]
|
|
89
|
-
),
|
|
90
|
-
(
|
|
93
|
+
), q = t.useCallback(
|
|
94
|
+
(o) => {
|
|
91
95
|
if (m) {
|
|
92
|
-
const
|
|
93
|
-
m.call(void 0,
|
|
96
|
+
const c = { target: i.current };
|
|
97
|
+
m.call(void 0, c);
|
|
94
98
|
}
|
|
95
|
-
|
|
99
|
+
o && o.target && o.target.props && o.target.props.anchor && o.target.props.anchor.focus();
|
|
96
100
|
},
|
|
97
101
|
[m]
|
|
98
102
|
), s = { "k-popover": !0 };
|
|
99
|
-
Array.isArray(a) ? a.forEach((
|
|
100
|
-
s[
|
|
103
|
+
Array.isArray(a) ? a.forEach((o) => s[o] = !0) : typeof a == "object" ? Object.keys(a).forEach((o) => {
|
|
104
|
+
s[o] = a[o];
|
|
101
105
|
}) : a && (s[a] = !0);
|
|
102
|
-
const
|
|
103
|
-
() => /* @__PURE__ */
|
|
106
|
+
const G = Z ? te[l] : oe[l], C = t.useMemo(
|
|
107
|
+
() => /* @__PURE__ */ t.createElement(t.Fragment, null, u && /* @__PURE__ */ t.createElement("div", { className: "k-popover-header" }, u), /* @__PURE__ */ t.createElement("div", { className: "k-popover-body", style: b }, ae(f)), le(f)),
|
|
104
108
|
[f, b, u]
|
|
105
109
|
);
|
|
106
|
-
return /* @__PURE__ */
|
|
107
|
-
|
|
110
|
+
return /* @__PURE__ */ t.createElement(k.Provider, { value: M }, /* @__PURE__ */ t.createElement(
|
|
111
|
+
Q,
|
|
108
112
|
{
|
|
109
|
-
id:
|
|
113
|
+
id: S,
|
|
110
114
|
role: "tooltip",
|
|
111
115
|
animate: D,
|
|
112
|
-
collision:
|
|
113
|
-
anchor:
|
|
116
|
+
collision: z,
|
|
117
|
+
anchor: F,
|
|
114
118
|
offset: x,
|
|
115
|
-
margin:
|
|
116
|
-
popupAlign:
|
|
117
|
-
anchorAlign:
|
|
119
|
+
margin: _,
|
|
120
|
+
popupAlign: B,
|
|
121
|
+
anchorAlign: L,
|
|
118
122
|
appendTo: R,
|
|
119
|
-
show:
|
|
120
|
-
scale:
|
|
121
|
-
positionMode:
|
|
122
|
-
style:
|
|
123
|
-
className:
|
|
123
|
+
show: N,
|
|
124
|
+
scale: K,
|
|
125
|
+
positionMode: I,
|
|
126
|
+
style: V,
|
|
127
|
+
className: j,
|
|
124
128
|
popupClass: s,
|
|
125
|
-
onOpen:
|
|
126
|
-
onClose:
|
|
127
|
-
onPosition:
|
|
128
|
-
onKeyDown:
|
|
129
|
+
onOpen: U,
|
|
130
|
+
onClose: q,
|
|
131
|
+
onPosition: H,
|
|
132
|
+
onKeyDown: X
|
|
129
133
|
},
|
|
130
|
-
p && l ? /* @__PURE__ */
|
|
134
|
+
p && l ? /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", { className: J("k-popover-callout", G) }), /* @__PURE__ */ t.createElement("div", { className: "k-popover-inner" }, C)) : C
|
|
131
135
|
));
|
|
132
136
|
}), y = {
|
|
133
137
|
callout: !0,
|