UNPKG

@progress/kendo-react-tooltip

Version:

React Tooltips library represents popups with information that is related to a UI element. KendoReact Tooltips package

9 lines (8 loc) 1.03 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@progress/kendo-react-common"),r=e=>{if(e){const t=e.querySelectorAll(n.FOCUSABLE_ELEMENTS.join(", "));if(t.length)return t[0]}},l=e=>{if(e){const t=e.querySelectorAll(n.FOCUSABLE_ELEMENTS.join(", "));if(t.length)return t[t.length-1]}},s=e=>{const t=r(document.querySelector(".k-popover-inner")),o=l(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())};exports.getFirstFocusableElement=r;exports.getLastFocusableElement=l;exports.handleFocusTrap=s;