bootstrap-vue-next
Version:
BootstrapVueNext is an early and lovely component library for Vue 3 & Nuxt 3 based on Bootstrap 5 and Typescript.
3 lines (2 loc) • 918 B
JavaScript
const e=(e=[])=>{const{activeElement:t}=document;return t&&!(null==e?void 0:e.some((e=>e===t)))?t:null};exports.attemptFocus=(t,o={})=>{try{t.focus(o)}catch(n){console.error(n)}return t===e()},exports.getActiveElement=e,exports.getModalZIndex=e=>{if("undefined"==typeof window)return 1055;const t=e??document.body,o=window.getComputedStyle(t).getPropertyValue("--bs-modal-zindex").trim(),n=Number.parseInt(o,10);return Number.isFinite(n)?n:1055},exports.isEmptySlot=e=>0===((null==e?void 0:e())??[]).length,exports.isVisible=e=>{if("none"===e.getAttribute("display"))return!1;const t=e.getBoundingClientRect();return!!(t&&t.height>0&&t.width>0)},exports.sortSlotElementsByPosition=(e,t)=>{if("undefined"==typeof Node||!Node||!e||!t)return 0;const o=e.compareDocumentPosition(t);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0};
//# sourceMappingURL=dom-CoD-aJvn.js.map
;