UNPKG

bootstrap-vue-next

Version:

BootstrapVueNext is an early and lovely component library for Vue 3 & Nuxt 3 based on Bootstrap 5 and Typescript.

29 lines (28 loc) 837 B
const getActiveElement = (excludes = []) => { const { activeElement } = document; return activeElement && !(excludes == null ? void 0 : excludes.some((el) => el === activeElement)) ? activeElement : null; }; const attemptFocus = (el, options = {}) => { const isActiveElement = (el2) => el2 === getActiveElement(); try { el.focus(options); } catch (e) { console.error(e); } return isActiveElement(el); }; const isEmptySlot = (el) => ((el == null ? void 0 : el()) ?? []).length === 0; const isVisible = (el) => { if (el.getAttribute("display") === "none") { return false; } const bcr = el.getBoundingClientRect(); return !!(bcr && bcr.height > 0 && bcr.width > 0); }; export { isVisible as a, attemptFocus as b, getActiveElement as g, isEmptySlot as i }; //# sourceMappingURL=dom-DSGRrOAo.mjs.map