UNPKG

@progress/kendo-react-popup

Version:

React Popup positions a piece of content next to a specific anchor component. KendoReact Popup package

34 lines (33 loc) 1.51 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { classNames as l, uPopup as p } from "@progress/kendo-react-common"; const y = (i, s, t) => { i.style.transitionDuration = "", s && i.classList.remove(...s.split(" ")), t && i.classList.remove(...t.split(" ")); }, A = typeof window != "undefined" && /Firefox/.test(window.navigator.userAgent), x = (i, s, t, f, c, e, d) => { if (s === 0) return f(); const L = `${e}Active`, o = l(p[e]({ direction: d, type: t, c })), r = l(p[L]({ direction: d, type: t, c })), u = (n) => { n.target === i && (i.removeEventListener("transitionend", u), y(i, o, r), t === "exit" ? i.style.display = "none" : i.style.display = "", f()); }; i.addEventListener("transitionend", u); const v = i.ownerDocument; if (!v) return; const a = v.defaultView; if (!a) return; const w = () => { y(i, o, r), t === "enter" && (i.style.display = ""), o && i.classList.add(...o.split(" ").filter((n) => n)), a.requestAnimationFrame(() => { i.style.transitionDuration = s + "ms", i.classList.add(...r.split(" ").filter((n) => n)); }); }; A ? a.requestAnimationFrame(w) : w(); }; export { x as animations };