UNPKG

@progress/kendo-react-sortable

Version:

React Sortable provides a sortable drag-and-drop functionality to elements within a list. KendoReact Sortable package

51 lines (50 loc) 1.5 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 { hasRelativeStackingContext as i } from "@progress/kendo-react-common"; const u = (t, e) => { for (let n = 0; n < t.length; n++) if (e(t[n])) return t[n]; }, f = (t, e) => { for (let n = 0; n < t.length; n++) if (e(t[n])) return n; return -1; }, r = (t) => String(t).trim().split(" "), p = (t, e) => { const n = r(e); return !!r(t.className).find((s) => n.indexOf(s) >= 0); }, a = /^(?:a|input|select|option|textarea|button|object)$/i, b = (t) => { if (t.tagName) { const e = t.tagName.toLowerCase(), n = t.getAttribute("tabIndex"), s = n === "-1"; let o = n !== null && !s; return a.test(e) && (o = !t.disabled && !s), o; } return !1; }, g = (t, e) => { for (; t && !e(t); ) t = t.parentNode; return t; }, l = i(), m = (t) => { if (!t || !l) return null; let e = t.parentElement; for (; e; ) { if (window.getComputedStyle(e).transform !== "none") return e; e = e.parentElement; } }; export { g as closest, u as find, f as findIndex, p as hasClasses, b as isFocusable, m as relativeContextElement, r as toClassList };