@progress/kendo-react-popup
Version: 
React Popup positions a piece of content next to a specific anchor component. KendoReact Popup package
9 lines (8 loc) • 1.38 kB
JavaScript
/**
 * @license
 *-------------------------------------------------------------------------------------------
 * Copyright © 2025 Progress Software Corporation. All rights reserved.
 * Licensed under commercial license. See LICENSE.md in the package root for more information
 *-------------------------------------------------------------------------------------------
 */
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@progress/kendo-react-common"),y=(i,s,t)=>{i.style.transitionDuration="",s&&i.classList.remove(...s.split(" ")),t&&i.classList.remove(...t.split(" "))},p=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),L=(i,s,t,c,f,u,d)=>{if(s===0)return c();const m=`${u}Active`,o=a.classNames(a.uPopup[u]({direction:d,type:t,c:f})),r=a.classNames(a.uPopup[m]({direction:d,type:t,c:f})),l=n=>{n.target===i&&(i.removeEventListener("transitionend",l),y(i,o,r),t==="exit"?i.style.display="none":i.style.display="",c())};i.addEventListener("transitionend",l);const v=i.ownerDocument;if(!v)return;const e=v.defaultView;if(!e)return;const w=()=>{y(i,o,r),t==="enter"&&(i.style.display=""),o&&i.classList.add(...o.split(" ").filter(n=>n)),e.requestAnimationFrame(()=>{i.style.transitionDuration=s+"ms",i.classList.add(...r.split(" ").filter(n=>n))})};p?e.requestAnimationFrame(w):w()};exports.animations=L;