UNPKG

motion-plus-vue

Version:

Motion Plus Vue

19 lines (18 loc) 519 B
function e(t) { return t.closest("[data-cursor]"); } function r(t) { return t.closest('a, button, input[type="button"]:not(:disabled)'); } function u(t) { return window.getComputedStyle(t).userSelect === "none" ? null : t.closest( "p, textarea:not(:disabled), input[type='text']:not(:disabled), h1, h2, h3, h4, h5, h6" ); } function o(t) { let n = e(t); return n ? [n.dataset.cursor, n] : (n = r(t), n ? ["pointer", n] : (n = u(t), n ? ["text", n] : ["default", null])); } export { o as findTarget };