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) • 692 B
JavaScript
const t=(t=[])=>{const{activeElement:e}=document;return e&&!(null==t?void 0:t.some((t=>t===e)))?e:null};exports.attemptFocus=(e,o={})=>{try{e.focus(o)}catch(n){console.error(n)}return e===t()},exports.getActiveElement=t,exports.isEmptySlot=t=>0===((null==t?void 0:t())??[]).length,exports.isVisible=t=>{if("none"===t.getAttribute("display"))return!1;const e=t.getBoundingClientRect();return!!(e&&e.height>0&&e.width>0)},exports.sortSlotElementsByPosition=(t,e)=>{if("undefined"==typeof Node||!Node||!t||!e)return 0;const o=t.compareDocumentPosition(e);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0};
//# sourceMappingURL=dom-Dzr6gmPm.js.map
;