UNPKG

@base-ui-components/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

2 lines (1 loc) 620 B
export declare const script = "!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest('[role=\"tablist\"]');if(!e)return;const i=e.querySelector(\"[data-selected]\");if(!i)return;const{left:o,right:n,top:r,bottom:c,width:l}=i.getBoundingClientRect(),{left:u,right:s,top:d,bottom:f,width:g}=e.getBoundingClientRect();if(0===l||0===g)return;const h=s-n,b=r-d,p=f-c,m=n-o,a=c-r;function v(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}v(\"left\",o-u),v(\"right\",h),v(\"top\",b),v(\"bottom\",p),v(\"width\",m),v(\"height\",a),m>0&&a>0&&t.removeAttribute(\"hidden\")}();";